A physical examination report interpretation logic tracing method and device based on gradient boosting tree

CN122716047BActive Publication Date: 2026-10-16XUNKANG INFORMATION TECH (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611199785.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-10
Publication Date
2026-10-16
Estimated Expiration
2046-08-10

AI Technical Summary

Technical Problem

然而,直接把一棵树的叶子输出分别赋给路径中的多个节点会导致贡献重复计数;直接把多棵树的路径条件合并为统一规则又可能产生原模型中未共同出现的条件组合

Benefits of technology

[0025] By selecting the corresponding tree group for the recorded target interpretation label and only tracking the split nodes that the target standardized feature vector actually passes through, this invention can isolate the model response of different labels; then, the node-level local contribution is calculated based on the difference in expected output of adjacent subtrees, so that the contribution of the same path is passed down level by level along the node and is consistent with the leaf output increment, thereby reducing the contribution inflation caused by repeatedly attributing the same leaf output to multiple path conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122716047B_ABST
    Figure CN122716047B_ABST
Patent Text Reader

Abstract

The application discloses a physical examination report interpretation logic tracing method and device based on a gradient boosting tree. Historical and target standardized feature vectors, historical manual interpretation labels and recorded target labels are obtained; a gradient boosting tree model is trained, local decision paths in a tree group corresponding to the target label are extracted, and node-level local contributions are calculated; candidate tracing logic chains are constructed based on real paths and their contribution reservation projections, and elimination or weight reduction is performed by using numerical satisfiability constraints and professional rationality constraints; the comprehensive fidelity is determined according to the local fidelity of the model response after the constraints, and the target interpretation logic tracing chain is output. Through the node contribution difference and the real path source constraint, the application reduces the repeated counting of contributions and the arbitrary splicing of cross-tree conditions, and makes the basis for forming the recorded label become a readable and checkable data processing result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of structured data processing and machine learning model interpretation, and in particular to a method and apparatus for tracing the source of medical examination report interpretation logic based on gradient boosting tree. Background Technology

[0002] Medical examination reports typically contain structured data such as indicator labels, indicator values, units of measurement, reference ranges, and target object attributes. After manual review, the medical examination information system can save the interpretation tags corresponding to the report. In scenarios such as quality verification, result review, and training presentations, in addition to reading existing tags, it is also necessary to trace the correspondence between the tags and the report indicators, threshold conditions, and combinations thereof.

[0003] One existing approach matches pre-defined interpretation rules with structured medical examination data item by item, resulting in a relatively intuitive output path. However, the workload for rule maintenance increases with variations in data source encoding, units of measurement, reference intervals, and human interpretation habits. Another approach utilizes gradient boosting tree models to learn the mapping relationship between historical structured medical examination data and historical human interpretation labels. However, this typically only outputs label response values, and the splitting conditions of multiple decision trees within the model have not yet been converted into a readable traceability logic chain for individual samples.

[0004] Similar model interpretation methods to this invention include tree structure visualization, split gain ranking, and feature contribution analysis. Tree structure visualization can display the model input columns, split thresholds, and leaf outputs; split gain can reflect the degree to which a particular split improves the objective function during training; and feature contribution analysis can quantify the local impact of input features on the model response. However, directly assigning the leaf outputs of a tree to multiple nodes in the path can lead to duplicate contribution counting; directly merging the path conditions of multiple trees into a unified rule may produce condition combinations that did not appear in the original model.

[0005] Therefore, existing technologies have at least the following limitations: On the one hand, they lack sample-level and label-level real path extraction and node contribution conservation mechanisms for recorded target interpretation labels, making it difficult to accurately decompose the model response into specific path conditions; on the other hand, they lack source constraints, numerical satisfiability verification, and professional rationality verification for cross-tree candidate condition combinations, which may lead to problems such as interval conflicts, inconsistent units, mismatched missing branches, or deviations from historical manual interpretation patterns in the generated traceability logic chain, thereby affecting the readability and verifiability of the traceability results. Summary of the Invention

[0006] The technical problem to be solved by this invention is: how to perform path-level decomposition of the local response of the gradient boosting tree model to the recorded target interpretation label without repetition in the scenario of physical examination report data processing, and to exclude candidate condition combinations that are numerically unsatisfactory or professionally incompatible while retaining the true path source, so as to obtain a readable and verifiable target interpretation logic traceability chain.

[0007] To address the aforementioned technical problems, this invention provides a method for tracing the logic of medical examination report interpretation based on gradient boosting trees, which is applied to medical examination report data processing scenarios, including:

[0008] Obtain historical standardized feature vectors, target standardized feature vectors, corresponding historical manual interpretation labels, and recorded target interpretation labels;

[0009] A gradient boosting tree model is trained based on the historical standardized feature vector and the historical manually interpreted labels. The target standardized feature vector is then input into the gradient boosting tree model to obtain the model response of the recorded target interpretation labels.

[0010] Extract the local decision path that the target standardized feature vector traverses within the tree group corresponding to the recorded target interpretation label, and calculate the node-level local contribution of the split node;

[0011] Construct a set of candidate tracing logic chains based on the local decision-making path and the node-level local contribution;

[0012] The candidate source tracing logic chain set is eliminated or reduced in weight by using numerical satisfiability constraints and professional rationality constraints to obtain a constrained source tracing logic chain set.

[0013] The overall fidelity is determined based on the local fidelity of the model response to the set of constrained tracing logic chains, and several target interpretation logic tracing chains are output according to the overall fidelity.

[0014] Further, the step of extracting the local decision path traversed by the target standardized feature vector within the tree group corresponding to the recorded target interpretation label, and calculating the node-level local contribution of the split node, includes: determining the corresponding tree group in the gradient boosting tree model based on the recorded target interpretation label; selecting child nodes from the root node according to the feature value and missing value default direction of the target standardized feature vector in each decision tree of the corresponding tree group; recording the traversed split nodes, the actual branch direction of the sample, and the leaf nodes to form a tree-level actual path; using a feature mapping table to restore the model input columns in the tree-level actual path to physical examination indicators, and restoring the model space threshold to the original unit threshold or the relative threshold of the reference interval; obtaining the expected output of the current node subtree and the expected output of the subtree actually entering the child node of the split node; determining the node-level local contribution based on the expected output of the current node subtree and the expected output of the subtree actually entering the child node, and forming the local decision path by the tree-level actual path and its node-level local contribution.

[0015] Further, the step of determining the node-level local contribution based on the expected output of the current node's subtree and the expected output of the subtree that actually enters the child node, and forming the local decision path from the actual tree-level path and its node-level local contribution, includes: weighting the output of the leaf node using the training sample coverage or leaf weights of the leaf nodes reaching the current node's subtree to obtain the expected output of the current node's subtree; and weighting the output of the leaf node using the training sample coverage or leaf weights of the leaf nodes reaching the subtree that actually enters the child node to obtain the expected output of the subtree that actually enters the child node. The conditional marginal contribution of the corresponding split node is obtained by calculating the difference between the expected output of the subtree that actually enters the child node and the expected output of the subtree of the current node; the conditional marginal contribution of the split node is accumulated along the actual path of the tree level to obtain the path contribution sum; the path contribution sum is checked for consistency with the increment of the output of the leaf node relative to the expected output of the root node subtree; if the consistency check passes, the conditional marginal contribution is determined as the node-level local contribution; if the consistency check fails, the expected output of the current node subtree and the expected output of the subtree that actually enters the child node are recalculated according to the node coverage relationship.

[0016] Further, the step of constructing a candidate tracing logic chain set based on the local decision path and the node-level local contribution includes: converting the split nodes in the local decision path into path condition items containing physical examination indicators, comparison relationships, model space thresholds, restoration thresholds, target values, node-level local contributions, and path source identifiers; forming a true path condition sequence by grouping path condition items belonging to the same tree-level actual path according to the path source identifier; merging intervals of the comparison relationships belonging to the same physical examination indicator in the true path condition sequence to obtain indicator constraint intervals; filtering the path condition items in the true path condition sequence according to the node-level local contribution to form a contribution retention projection; statistically analyzing the co-occurrence frequency and threshold distribution of path condition items among different contribution retention projections; and combining the true path condition sequence, the contribution retention projection, and path condition items that satisfy the co-occurrence frequency condition as candidate tracing logic chains to form the candidate tracing logic chain set.

[0017] Further, the step of combining the real path condition sequence, the contribution retention projection, and path condition items that satisfy the co-occurrence frequency condition as candidate tracing logic chains to form the candidate tracing logic chain set includes: grouping path condition items in different contribution retention projections according to physical examination indicators and comparison directions; converting the restoration threshold of each group of path condition items to the relative coordinates of the corresponding reference interval; performing threshold clustering on the same group of path condition items according to the distance between the relative coordinates to obtain threshold clusters and threshold cluster representative intervals; counting the single occurrence frequency and combined co-occurrence frequency of path condition items corresponding to different threshold clusters in the real path condition sequence; retaining the path condition item combinations whose combined co-occurrence frequency satisfies the preset co-occurrence frequency condition; performing indicator constraint interval non-empty verification on the path condition item combinations, and adding the path condition item combinations to the candidate tracing logic chain set after the verification passes; associating each candidate tracing logic chain with its source real path identifier, retained node-level local contribution, and co-occurrence frequency to prevent cross-tree condition combinations lacking real path or co-occurrence data support from entering the candidate tracing logic chain set.

[0018] Further, the step of eliminating or reducing the weight of the candidate traceability logic chain set using numerical satisfiability constraints and professional rationality constraints to obtain a constrained traceability logic chain set includes: obtaining the physical value range, unit conversion relationship, applicable reference interval, category value set, and missing value branch information of each physical examination indicator; sequentially performing value range verification, indicator constraint interval intersection verification, unit consistency verification, reference interval adaptation verification, category value verification, and missing value branch consistency verification on each candidate traceability logic chain; eliminating candidate traceability logic chains or corresponding path condition items with numerical hard violations to obtain a set of numerically satisfiable logic chains; loading a professional rationality constraint library containing the directional relationship, compatibility relationship, indicator combination relationship, applicable object relationship, and historical manual interpretation mode between the indicator and the recorded target interpretation label; using the professional rationality constraint library to identify professional hard violations and professional soft deviations in the set of numerically satisfiable logic chains; eliminating numerically satisfiable logic chains with professional hard violations, and reducing the weight of numerically satisfiable logic chains with only professional soft deviations to obtain the constrained traceability logic chain set.

[0019] Further, the step of using the professional rationality constraint library to identify the professional hard violations and professional soft deviations in the set of logical chains that the numerical values ​​can satisfy includes: encoding the physical examination indicators, comparison directions, indicator constraint intervals, indicator combinations, and applicable object attributes in each logical chain that the numerical values ​​can satisfy into a logical chain constraint vector; reading the directional constraints, compatibility constraints, combination constraints, and applicable object constraints associated with the recorded target interpretation labels from the professional rationality constraint library; matching the logical chain constraint vector with the directional constraints, compatibility constraints, combination constraints, and applicable object constraints item by item to form a constraint matching result; determining the existence of the professional hard violation when the constraint matching result indicates directional conflict, explicit incompatibility, mutual exclusion conditions serving as the basis for the same direction, or mismatch of the applicable object; determining the existence of the professional soft deviation when the constraint matching result does not have the professional hard violation and indicates that the historical occurrence frequency has not reached the first frequency condition, the indicator value is located at the edge of the historically commonly used interval, or the path structure deviates from the historically common structure; and determining the weighting coefficient corresponding to the professional soft deviation based on the historical occurrence frequency, the deviation amount relative to the historically commonly used interval, and the structural distance relative to the historically common structure.

[0020] Further, the step of determining the comprehensive fidelity based on the local fidelity of the model response according to the constrained source tracing logic chain set, and outputting several target interpretation logic source tracing chains according to the comprehensive fidelity, includes: obtaining the target response increment of the model response relative to the expected response of the model with the recorded target interpretation labels; accumulating the node-level local contributions retained in each constrained source tracing logic chain to obtain the logic chain contribution increment; determining the local fidelity based on the difference between the target response increment and the logic chain contribution increment; and determining the local fidelity based on the local fidelity and professional compatibility. The overall fidelity is determined by at least two of the following: sex score, historical human interpretation pattern matching degree, explanatory stability score, and explicit basis matching score; wherein, the explanatory stability score is determined based on the reproduction of corresponding path condition terms under model retraining, training sample resampling, or adjacent feature samples, and the explicit basis matching score is enabled when there is an explicit basis record associated with the historical human interpretation label; the constrained tracing logic chain set is sorted according to the overall fidelity, and a preset number of constrained tracing logic chains at the top of the sort are converted into the target interpretation logic tracing chain.

[0021] Furthermore, the historical standardized feature vector and the target standardized feature vector are obtained by performing standardization processing on the historical structured physical examination data and the target structured physical examination data. The standardization processing includes: converting the indicator identifiers of different data sources into standard indicator codes based on the indicator coding mapping table; converting the original values ​​of the physical examination indicators into model standard unit values ​​based on the unit conversion relationship; selecting an applicable reference interval according to the target object attributes, and calculating the relative position, abnormal direction, or abnormal multiple of the model standard unit value in the applicable reference interval; performing category coding on categorical physical examination indicators, and generating missing indicators for missing physical examination indicators; saving the feature mapping table between the model input column, standard indicator code, original indicator identifier, model standard unit, and applicable reference interval; and for two or more recorded target interpretation labels corresponding to the same target structured physical examination data, performing model response determination, local decision path extraction, candidate tracing logic chain construction, and target interpretation logic tracing chain output respectively.

[0022] The present invention also provides a source tracing device for interpreting physical examination reports based on gradient boosting trees, including a data acquisition module, a model response module, a local contribution module, a candidate chain construction module, a constraint processing module, and a source tracing output module; the modules are respectively used to execute the corresponding processing steps in the aforementioned method.

[0023] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any of the aforementioned methods.

[0024] The present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the computer program, when executed by the processor, implements any of the aforementioned methods.

[0025] By selecting the corresponding tree group for the recorded target interpretation label and only tracking the split nodes that the target standardized feature vector actually passes through, this invention can isolate the model response of different labels; then, the node-level local contribution is calculated based on the difference in expected output of adjacent subtrees, so that the contribution of the same path is passed down level by level along the node and is consistent with the leaf output increment, thereby reducing the contribution inflation caused by repeatedly attributing the same leaf output to multiple path conditions.

[0026] Because the candidate source tracing logic chain retains the real path identifier and co-occurrence data basis, and is subject to numerical satisfiability constraints and professional rationality constraints in sequence, this invention can first eliminate infeasible conditions at the level of value range, interval, unit and missing branch, and then eliminate or reduce the conditions of conflicting directions, incompatible combinations or deviations from historical patterns; combined with local fidelity sorting, the output logic chain can simultaneously have model response coverage basis, real path source and constraint verification record. Attached Figure Description

[0027] Figure 1 A schematic diagram of the overall process of the logical tracing method for interpreting physical examination reports provided in this embodiment of the invention;

[0028] Figure 2 A schematic diagram illustrating the principle of local decision path extraction and node-level local contribution calculation provided in this embodiment of the invention;

[0029] Figure 3 A flowchart illustrating the candidate tracing logic chain construction process provided in this embodiment of the invention;

[0030] Figure 4 A flowchart illustrating the process of handling numerical satisfiability constraints and professional rationality constraints provided in embodiments of the present invention;

[0031] Figure 5 A schematic diagram of the module structure of the physical examination report interpretation logic tracing device provided in an embodiment of the present invention. Detailed Implementation

[0032] The present invention will be further described below with reference to the accompanying drawings and embodiments. The following embodiments are used to illustrate the technical solutions of the present invention, and are not intended to limit the scope of protection of the present invention. Where there is no conflict, the technical features of the various embodiments can be combined with each other.

[0033] It should be specifically noted that this invention primarily addresses the logical tracing issue in the data processing of physical examination reports. Those skilled in the art should understand that the interpretation of physical examination reports involves medical diagnostic procedures, which are themselves not patentable under relevant laws. Therefore, to clarify the protection boundaries of this invention and ensure its patentability, the technical description of this invention intentionally elevates and abstracts the content related to specific medical diagnoses. Specifically, this invention abstracts specific disease diagnosis conclusions into "recorded target interpretation labels," specific medical test indicators into "standardized feature vectors," and the doctor's clinical interpretation logic into the model training and path tracing process. This approach aims to strictly limit the protection focus of this invention to computer-executed data processing steps such as "data standardization, model path extraction, and numerical logic verification." However, this does not mean that the present invention is divorced from the specific application scenario of medical examination reports. On the contrary, it is precisely because medical examination report data has unique data quality problems such as multi-source heterogeneity (e.g., differences in indicator coding between different hospitals), diversity of measurement units, and differences in reference intervals among individuals (e.g., age and gender differences) that the technical means proposed in this invention, such as "standardized feature vector construction," "numerical satisfiability constraints," and "professional rationality constraints," become necessary measures to solve the above-mentioned data processing problems. Therefore, the higher-level description adopted by the present invention is an accurate definition based on patent compliance, and its technical features are closely integrated with the medical examination report data processing scenario, constituting a clear and complete technical solution.

[0034] Example 1

[0035] like Figure 1 As shown, this embodiment provides a method for tracing the logic of physical examination report interpretation based on gradient boosting tree, which is applied to the scenario of physical examination report data processing, including steps S101 to S106.

[0036] Step S101: Obtain the historical standardized feature vector, the target standardized feature vector, the corresponding historical manual interpretation label, and the recorded target interpretation label.

[0037] The historical standardized feature vector is formed from multiple historical structured physical examination data after unified indicator coding, unit conversion, reference interval normalization, and missing item marking; the target standardized feature vector is formed from the reports to be traced using the same processing method. Recorded target interpretation labels are data fields already saved in the physical examination information system after manual review; this method does not generate new interpretation labels.

[0038] Step S102: Train a gradient boosting tree model based on historical standardized feature vectors and historical manually interpreted labels. Input the target standardized feature vector into the gradient boosting tree model to obtain the model response with the recorded target interpretation labels.

[0039] Gradient boosting tree models can employ histogram-based gradient boosting trees, XGBoost, LightGBM, CatBoost, or other implementations with a tree-set structure. In multi-label scenarios, each recorded target label corresponds to a tree group or an independently readable output channel.

[0040] For a recorded target label c, the model response can be expressed as:

[0041] Equation (1)

[0042] in, Represents the target standardized feature vector For the recorded target, interpret the label. The model response; This indicates that the target interpretation label has been recorded. The baseline response; Indicates the identification label of the recorded target. The corresponding number of decision trees; Indicates the decision tree sequence number; Indicates the first Each decision tree standardizes the feature vector of the target. The output of the model can be either retained as the original response value or converted to a normalized response value using a preset mapping function.

[0043] Specifically, the historical standardized feature vectors and the target standardized feature vectors use the same column order and encoding version. Each feature vector can contain columns for continuous indicators, relative positions within reference intervals, categorical indicators, missing data flags, and target object attributes. The feature mapping table stores the standard indicator encoding, data type, standard unit, reference interval selection rules, and missing data handling rules for each model input column. Version verification is performed on the feature mapping table before model training. When the mapping version used by the target structured physical examination data is inconsistent with the model training version, the fields are rearranged and encoded according to the training version before generating the target standardized feature vector, thus avoiding misalignment of model input columns.

[0044] In this embodiment of the invention, training data is grouped according to the target object to which the data records belong, ensuring that data records of the same target object formed at different times only enter one set in the training set, validation set, or test set, thereby avoiding information leakage caused by similar records of the same object crossing sets. For binary classification output, binary cross-entropy can be used as the training objective; for multi-class classification output, multivariate cross-entropy can be used; for multi-label output, tree groups can be trained separately for each recorded target label, or a tree set with independently readable output channels can be trained. Different training objectives only change the training configuration of the gradient boosting tree model, without changing the subsequent processing logic of extracting the local decision path of the corresponding tree group according to the recorded target label.

[0045] Optionally, when the number of samples with different historical manually interpreted labels varies, sample weights can be set according to the frequency of each label in the training data, or stratified sampling can be performed while maintaining the conditional distribution of labels. During model iteration, the validation set loss and target label response stability are monitored. Adding decision trees is stopped if the validation set loss does not improve within a preset number of rounds. The preset number of rounds can be set to 20 to 200 rounds, with the specific value determined based on the training sample size and tree depth. The tree depth, minimum leaf node coverage, and learning rate are determined through validation set search, and the selected parameters are saved along with the model version.

[0046] It's important to note that completing model training does not automatically guarantee that the path is suitable for output. The system also performs a response consistency check on each recorded target label, including confirming the mapping relationship between the target label and the corresponding tree group, confirming that the feature mapping table can reconstruct all the actual model input columns traversed, and confirming that the leaf coverage and the expected output of the nodes can be read or recalculated. Only model versions that pass the above checks enter the local decision path extraction stage, thereby reducing the impact of inconsistencies in model version, field version, or label channel on the tracing results.

[0047] Step S103: Extract the local decision paths traversed by the standardized feature vector of the target within the tree group corresponding to the recorded target interpretation labels, and calculate the node-level local contribution of the split nodes. This step saves the path source separately for each tree, without forcibly reconstructing multiple trees into a unified decision tree.

[0048] Step S104: Construct a candidate source tracing logical chain set based on local decision paths and node-level local contributions. Each candidate source tracing logical chain should at least include path condition terms, node-level local contributions, tree identifiers, and recorded target interpretation labels, and should allow the storage of split gain, node coverage, and leaf weights as auxiliary metadata. The training-phase split gain only describes the degree to which splitting improves the training objective and does not directly replace node-level local contributions.

[0049] Step S105: The candidate traceability logic chain set is eliminated or weighted using numerical satisfiability constraints and professional rationality constraints to obtain the constrained traceability logic chain set. Numerical satisfiability constraints are used to check whether the conditions are valid at the data and mathematical level; professional rationality constraints are used to check whether the direction of the conditions, the combination of conditions, the applicable objects, and the historical manual interpretation patterns are compatible.

[0050] Step S106: Determine the overall fidelity based on the local fidelity of the model response to the constrained source tracing logic chain set, and output several target interpretation logic source tracing chains according to the overall fidelity. Each target interpretation logic source tracing chain may include health check indicators, target values, applicable reference intervals, comparison relationships, restoration thresholds, combination relationships, node-level local contributions, constraint verification results, and overall fidelity. The output content is used to explain the modeling source tracing basis of existing labels, without changing the recorded target interpretation labels.

[0051] In this embodiment, the data flow begins with the collected structured data and ends with the target interpretation logic tracing chain, without including operations that directly affect the target object. Path extraction is performed on existing labels to keep the decision trees and node contributions of different labels isolated. A closed loop is formed using real paths, two types of constraints, and local fidelity, giving the output three verifiable dimensions: source, constraint, and response coverage.

[0052] Example 2

[0053] like Figure 2 As shown, this embodiment further elaborates on local decision path extraction and node-level local contribution calculation.

[0054] After determining the corresponding tree group in the gradient boosting tree model based on the recorded target interpretation labels, for any decision tree in the corresponding tree group, the splitting features and splitting thresholds are read from the root node. If the corresponding feature in the target standardized feature vector has a valid value, the first or second child node is entered according to the comparison result; if the corresponding feature is missing, the default direction of the missing value saved by the model is read and the specified child node is entered. The above process is repeated until the leaf node is reached, and the actual tree-level path is formed by the traversed split nodes, the actual branch direction of each split node, and the leaf node.

[0055] The path parser reads the standard indicator code, original indicator identifier, model standard unit, and applicable reference interval corresponding to the model input columns from the feature mapping table, and restores the splitting threshold of the model space to the original unit threshold or the relative threshold of the reference interval. Each path condition item stores at least the tree identifier, node identifier, standard indicator code, comparison relationship, restoration threshold, target value, default direction for missing values, actual branch direction, and leaf output. Thus, the column names within the model can be converted into fields that can be directly retrieved from the physical examination report data.

[0056] To obtain the expected output of the current node's subtree, the leaf outputs within the current node's subtree are weighted by coverage:

[0057] Equation (2)

[0058] in, Indicates the first Nodes in a decision tree The expected output of the current node's subtree; Represents a node The set of leaf nodes contained in the subtree; Indicates the leaf node index; Indicates the first Leaf nodes in a decision tree The training sample coverage or leaf weights; Indicates the first Leaf nodes in a decision tree The output of the node can be read even when the model directly saves the expected output of the node, without recalculating the weighted output.

[0059] Let ch(n,x) be the child node selected by the target standardized feature vector at node n. Then, the conditional marginal contribution of node n can be expressed as:

[0060] Equation (3)

[0061] in, Indicates the first Nodes in a decision tree Standardize the feature vector of the target Conditional marginal contribution; Represents the target standardized feature vector At the node The child node actually entered; This indicates the expected output of the subtree that actually enters the child node; The meaning is the same as in equation (2). This difference only attributes the increase or decrease in response from the current node to the actual child node to the current split node, and therefore does not repeatedly distribute the leaf output as a whole to every node on the path.

[0062] In an alternative implementation, TreeSHAP local interpretation can be performed on the target standardized feature vector, and the TreeSHAP contribution of the same health indicator can be assigned to the corresponding path condition item according to node coverage weight, path occurrence frequency, or absolute value of conditional marginal contribution. Regardless of whether conditional marginal contribution or TreeSHAP contribution is used, tree identifiers and path node identifiers are preserved to maintain the correspondence between contributions and actual paths.

[0063] The local decision path refers to the ordered sequence of split nodes that the target standardized feature vector actually traverses when propagating from the root node to a single leaf node in a specified decision tree. This definition differs from the global rule set of all possible branches in the tree structure, and also from the global feature importance arranged only by split gain. The local decision path only records the nodes actually visited by the model response, so its path conditions can be verified item by item against the target standardized feature vector; for unvisited sibling subtrees, even if they contain nodes with large split gains, these nodes are not considered the direct source of the target interpretation logic tracing chain.

[0064] The node-level local contribution is essentially the increment of the model response between adjacent path states. The expected output of the current node subtree represents the conditional expectation when the current node has been reached but the next branch has not yet been determined using the current split condition; the expected output of the subtree that actually enters the child node represents the conditional expectation obtained after adding the current split condition. The difference between the two corresponds to the new response brought about by the current split condition, rather than the output of the entire leaf node. When calculating this difference node by node along the path, the actual child node that the previous node enters is exactly the current node of the next node, and the internal expected outputs cancel each other out. In the end, only the difference between the leaf output and the expected output of the root node subtree is retained, which is why equation (4) can hold.

[0065] Preferably, the leaf coverage uses the effective sample coverage saved at the end of model training and is bound to the tree structure version. For gradient boosting tree models trained using second-order gradient statistics, the expected output of the subtree can also be calculated using leaf weights or coverage statistics saved within the nodes. Regardless of the weight caliber chosen, all nodes in the same tree use the same caliber, and sample quantity weights are not mixed with other coverage weights in the same path. If the model undergoes pruning, leaf merging, or incremental training, the node coverage relationship corresponding to the model version is regenerated to avoid continuing to use the old version statistics.

[0066] For category set splits, the path parser saves the "belongs to set" or "does not belong to set" judgment results along with the original category value set; for the missing value default branch, it simultaneously saves the target feature missing state, default direction, and actual entered child node. Thus, the conditional marginal contribution is associated not only with the health check indicator name but also with the complete conditional semantics required to trigger the actual branch. If a health check indicator appears repeatedly in the same path, each appearance corresponding to a different node state and different conditional marginal contribution, it is not merged during the contribution calculation stage but rather during the candidate source tracing logic chain construction stage, where interval merging is performed based on upper and lower bound relationships.

[0067] Optionally, the path allocation of TreeSHAP contributions is constrained by the principle of "constant total contribution". For multiple actual path nodes corresponding to the same health check index, an allocation ratio is first formed based on the absolute value of the marginal contribution of each node condition, the node coverage, or a combination of both. Then, the TreeSHAP contribution of the health check index is written into each path condition item according to the allocation ratio. After allocation, the sum of the contributions obtained by each path condition item should be equal to the TreeSHAP contribution of the health check index; the sum of the contributions of all health check indices should be consistent with the increment of the target label model response relative to the expected model response. This processing enables the feature-level local additivity of TreeSHAP and the node-level readability of the real path to be compatible within the same data structure.

[0068] The technical significance lies in the fact that node-level local contributions simultaneously retain two information dimensions: "whether the condition was actually traversed" and "how much the condition increased the model response." Simply saving the actual path without calculating the increment makes it difficult to distinguish between primary and secondary conditions within the path; calculating feature contributions without saving the path results in the loss of thresholds, comparison relationships, and dependencies between preceding and subsequent conditions. By binding node increments to real path conditions, this embodiment provides a unified basic record for subsequent contribution projection, numerical satisfiability verification, and comprehensive fidelity calculation.

[0069] Example 3

[0070] This embodiment illustrates the consistency verification of node-level local contributions. For the t-th decision tree, the conditional marginal contribution accumulated along the tree-level actual path of the target standardized feature vector x has the following node-by-node cancellation relationship:

[0071] Equation (4)

[0072] in, Represents the target standardized feature vector In the The set of split nodes traversed in a decision tree; The meaning is the same as that of equation (3); Represents the target standardized feature vector The final leaf node reached The output; Indicates the index of the leaf node reached; Indicates the first Root node of decision tree The expected output of the subtree; Indicates the first The root node of a decision tree.

[0073] The consistency checker compares the path contribution and value obtained from the left side of equation (4) with the leaf output increment on the right side. When the difference between the two does not exceed the preset calculation tolerance, the marginal contribution of each condition is determined as the node-level local contribution; when the difference between the two exceeds the preset calculation tolerance, it checks whether the leaf coverage is consistent with the current model version, whether there are missing value branches in the path, whether the category set split is completely parsed, and whether the floating-point precision is consistent, and recalculates the expected output of the subtree of the relevant node.

[0074] The above node-by-node cancellation relationship applies to numerical comparison splits, category set splits, and default branches for missing values ​​because the calculation object is the difference between the expected outputs of two adjacent subtrees, regardless of the specific split type. Regarding parameters, the preset calculation tolerance can be set according to the data precision of the leaf output. to When the output uses single-precision floating-point numbers, the tolerance can be selected close to the upper end of the interval; when the output uses double-precision floating-point numbers, the tolerance can be selected close to the lower end of the interval.

[0075] In one example, the expected output of the root subtree of a tree is 0.06. The output of the target standardized feature vector entering the leaf along the three split nodes is 0.46. The conditional marginal contributions of the three split nodes are 0.17, 0.13, and 0.10, respectively. The sum of the path contributions is 0.40, and the difference between the leaf output and the expected output of the root subtree is also 0.40, thus the consistency check passes. These values ​​are only used to illustrate the calculation process and do not constitute a limitation on the range of the model's output.

[0076] Example 4

[0077] like Figure 3 As shown, this embodiment provides the process for constructing a candidate tracing logic chain.

[0078] Each split node in the local decision path is converted into a path condition term. The path condition term is represented using structured records, with fields including tree identifier, node identifier, recorded target interpretation label, health indicators, comparison relationship, model space threshold, restoration threshold, target value, node-level local contribution, split gain, node coverage, and path source identifier. Path condition terms in a single decision tree are clustered according to their path source identifiers to form the true path condition sequence.

[0079] For the same physical examination indicator that appears repeatedly within the same real path condition sequence, the interval merger maintains a lower bound set, an upper bound set, and a category-allowed set. The condition with the largest boundary value among the greater than category conditions forms the merged lower bound, and the condition with the smallest boundary value among the less than category conditions forms the merged upper bound. The category set is split and the merged category-allowed set is formed by finding the intersection of the sets. The interval merger also records the open or closed interval attributes to ensure that equal boundary conditions can be accurately determined. If the merged lower bound exceeds the upper bound, or if the boundaries are equal but at least one side is an open interval, then the corresponding indicator constraint interval is empty.

[0080] The contribution filter selects path condition items based on the absolute value, sign direction, and cumulative contribution coverage ratio of node-level local contributions. The retained condition items and their original path order form a contribution retention projection. When generating candidate source chain q from the true path condition sequence P, the contribution retention ratio can be expressed as:

[0081] Equation (5)

[0082] in, Represents the candidate tracing logic chain Relative to the actual path condition sequence The percentage of contributions retained; Represents the candidate tracing logic chain The set of tree node indices that are retained; Represents the true path condition sequence The set of tree node indices; Indicated by decision tree sequence number and node sequence number The tree node index; The meaning is the same as that of equation (3); This represents absolute value operations. The preset lower limit for the contribution retention ratio can be set from 0.60 to 0.95. The closer the value is to 1, the more complete the model response information retained by the candidate chain, but the number of path condition terms may also increase.

[0083] The sources of candidate source tracing logic chains are limited to three categories: complete sequences of real path conditions, contribution retention projections of single real paths, and combinations of path condition items supported by real path co-occurrence data. By using path source identifiers and contribution retention ratios as constraints, the readability of the logic chains can be improved while preventing conditions without model path support from entering the candidate source tracing logic chain set.

[0084] In this embodiment of the invention, the candidate source tracing logical chain is a set of path condition items with source relationships, rather than a list of ordinary rules detached from their sources. Each path condition item is located to the original tree node through a four-level index: "model version—recorded target interpretation label—tree identifier—node identifier." The candidate source tracing logical chain also stores the order of condition items in the original real path, the total contribution of deleted condition items, and the contribution retention ratio. With this source structure, it is possible to distinguish between "conditions that appear consecutively in the same tree," "similar conditions that appear repeatedly in different trees," and "condition combinations formed only through statistical co-occurrence," so that the three types of candidate chains have different evidence identifiers during subsequent sorting and display.

[0085] Contribution retention projection of a real path refers to deleting path condition items from a real path condition sequence whose node-level local contributions do not meet the retention criteria, without changing the original order and source identifier of the remaining conditions. The retention criteria can be one or more of the following: a lower limit of the absolute value of a single node contribution, a cumulative contribution coverage ratio, or a preset number of condition items. When using the cumulative contribution coverage ratio, the condition items are first sorted by the absolute value of the node-level local contribution, and then added to the candidate set in sequence until the contribution retention ratio shown in equation (5) reaches the preset lower limit; then the in-chain order is restored according to the original order of the condition items in the real path. This process only performs deletion and order restoration, and does not create new thresholds or new comparison relationships that do not exist in the original path.

[0086] It is important to note that the fact that multiple decision trees jointly form a model response does not mean that the path conditions of any two trees can directly form a logical chain. If two conditions have never appeared in the same real path and there is a lack of statistical records that meet the preset co-occurrence frequency condition, then even if both have significant local contributions at the node level, a cross-tree combination will not be generated. For cross-tree combinations supported by co-occurrence data, the system saves the set of real path identifiers supporting the combination, the number of co-occurrences, and the corresponding model version, and re-examines their interval intersections during the numerical satisfiability constraint stage. Thus, cross-tree combinations are statistical projections controlled by both the source and constraints, rather than forcibly converting the tree set into a non-existent binary tree.

[0087] The interval merging of path condition terms simultaneously handles numerical boundaries, boundary openness / closedness, and category sets. For numerical health indicators, multiple lower bounds are selected based on the boundary with the strongest constraint, and multiple upper bounds are selected based on the boundary with the strongest constraint. When the same boundary has both conditions that include and do not include the boundary, the condition that does not include the boundary is used as the merging result. For categorical health indicators, the intersection of multiple consecutive sets is used for splitting conditions. If the intersection is empty, the corresponding true path parsing result may be inconsistent with the category mapping version, and the system marks it as pending review instead of directly forming a candidate tracing logic chain.

[0088] In one construction example, a recorded target identification label corresponds to three real paths. The first path contains "I01 greater than 4.0, I02 less than 12, I04 greater than 100", the second path contains "I01 greater than 4.3, I02 less than 11.8", and the third path contains "I01 greater than 4.1, I03 belongs to set {C1, C2}". If the co-occurrence frequency of the combination of I01 and I02 reaches the preset co-occurrence frequency condition, the system can generate a candidate source tracing logical chain containing the I01 threshold cluster and the I02 threshold cluster after threshold clustering; if I04 and I03 do not co-occur on the same path and the co-occurrence frequency does not meet the condition, the combination of the two is not generated. This example illustrates that the candidate chain construction can both compress duplicate thresholds and avoid arbitrarily splicing conditions lacking path basis due to large contributions.

[0089] Through the aforementioned data structure and construction mechanism, the complete real path retains the original decision-making process within the model, the contribution retention projection improves output simplicity, and the co-occurrence condition combination reflects stable and recurring local patterns in multiple tree paths. All three types of candidate chains are uniformly included in subsequent constraint and fidelity calculations, but the source type is always retained, allowing the final output to select either a complete chain that is closer to the original model or a projected chain with fewer conditions and sufficient contribution coverage.

[0090] Example 5

[0091] This embodiment further illustrates the threshold clustering and condition combination constraints between different real paths.

[0092] The path condition terms are first grouped according to the physical examination indicators and the comparison direction. Since the same physical examination indicator may use different units of measurement or reference intervals in different data sources, the clusterer first performs unit restoration according to the feature mapping table, and then converts the restored threshold to the relative coordinates of the corresponding reference interval. The relative coordinates adopt the same reference interval normalization method as in the training phase, so that the threshold distances under different reference intervals are comparable.

[0093] Threshold clustering can employ distance-based hierarchical clustering, density-based clustering, or binning with a preset width. The upper limit of the cluster distance can be set to 0.02 to 0.20 of the reference interval span. When the training sample size is small, values ​​closer to the upper end of the interval are selected to reduce threshold cluster fragmentation; when the training sample size increases and the threshold distribution stabilizes, values ​​closer to the lower end of the interval are selected to maintain conditional resolution. The representative interval of each threshold cluster can be determined by the quantile interval of the threshold within the cluster, or by a combination of the weighted average of node-level local contributions and the discrete range.

[0094] The system counts the frequency of individual occurrences, co-occurrence frequency along the same path, and recurrence frequency across model versions for each threshold cluster. Only when a combination of path condition items co-occurs in at least one real path, or when the co-occurrence frequency of such combinations reaches a preset co-occurrence frequency condition, does the system proceed to the non-empty validation of the indicator constraint interval. The preset co-occurrence frequency condition can be expressed as an absolute number of occurrences or as a proportion of the number of real paths corresponding to the target label; the proportion can be set from 0.01 to 0.30.

[0095] Each validated path condition combination stores the set of source real path identifiers, threshold cluster identifiers, local contributions at the retained node level, and co-occurrence frequency. These associated fields allow subsequent users to reverse-engineer the tree and split nodes corresponding to the combination; if a combination lacks support from real paths or co-occurrence data, it is not added to the candidate tracing logical chain set.

[0096] Example 6

[0097] like Figure 4 As shown, this embodiment performs a two-stage constraint process on the candidate tracing logic chain, first on numerical satisfiability and then on professional rationality.

[0098] The first stage reads the physical value range, unit conversion relationship, applicable reference interval, category value set, and missing value branch information for each physical examination indicator. Value range verification identifies whether the restoration threshold falls within the preset interpretable value range of the physical examination indicator; indicator constraint interval intersection verification identifies whether the merged lower and upper bounds of the same indicator form a non-empty interval; unit consistency verification confirms that the target value, restoration threshold, and applicable reference interval can be converted to a unified unit; reference interval adaptation verification confirms that the called reference interval matches the target object attribute; category value verification confirms that the category condition belongs to the category value set saved during the training phase; and missing value branch consistency verification confirms that when the target feature is missing, the true path indeed propagates according to the default direction of the missing value saved by the model.

[0099] When the preset physical value range of a certain physical examination indicator does not contain negative values, but the path condition requires that the physical examination indicator be less than a negative threshold, or the merged lower bound of the same physical examination indicator exceeds the merged upper bound, it is determined that there is a numerical hard violation in the candidate traceability logic chain. If only a single path condition item has missing unit metadata and the other conditions can be independently satisfied, the path condition item can be removed while the other conditions in the chain are retained. For cases of interval conflicts or missing branches due to overall path dependency errors, the entire candidate traceability logic chain is removed. This yields a set of logic chains where the numerical values ​​can be satisfied.

[0100] The second stage involves loading a professional rationality constraint library. This constraint library can consist of preset professional knowledge entries, statistical results of historical manual interpretation records, and confirmed explicit evidence records. Entry fields include recorded target interpretation labels, examination indicators, comparison directions, compatibility relationships, combination relationships, applicable object relationships, historically commonly used intervals, and historical frequency of occurrence. Hard professional violations include directional conflicts, explicit incompatibility, mutually exclusive conditions serving as evidence in the same direction, or mismatched applicable objects; soft professional deviations include historical frequency not meeting the first frequency condition, indicator values ​​located at the edge of historically commonly used intervals, or an acceptable deviation between the path structure and historically common structures.

[0101] Both numerical hard violations and professional hard violations generate removal records, while professional soft deviations generate deweighted records. Each record stores the constraint type, hit field, processing action, pre-processing logical chain identifier, and post-processing logical chain identifier to display the constraint processing process when interpreting the logical tracing chain of the output target. The reason for using sequential two-stage constraints is that interval conflicts, unit errors, and missing branch errors at the numerical level do not need to enter professional rule matching; deleting these conditions first reduces the number of matching objects in the second stage and prevents professional scoring from masking contradictions in the underlying data.

[0102] The numerical satisfiability constraint is a set of deterministic verification rules applied to the path condition item data structure. Its inputs include the target value, restoration threshold, comparison relationship, indicator constraint range, unit, applicable reference range, allowed category set, and missing value branch information. The output is one of the following processing states: pass, delete condition item, delete logical chain, or pending review. For the same input data, the same feature mapping table version, and the same constraint configuration, the numerical satisfiability constraint yields the same processing state, thus allowing for independent recalculation and verification outside of the model interpretation results.

[0103] Specifically, unit consistency verification not only compares whether the unit strings are the same, but also reads the conversion type, conversion factor, and offset from the unit conversion relationship. The target value, restoration threshold, and applicable reference interval are first converted to the model's standard units, and then the size relationship and interval intersection operations are performed. If a reversible conversion relationship exists, the values ​​before and after conversion, as well as the conversion relationship identifier, are saved; if no confirmed conversion relationship exists, the conversion factor is not inferred, but the corresponding path condition item is marked as incomparable in units. For proportional, count, and categorical health indicators, validators adapted to the data types are called respectively to avoid performing meaningless numerical comparisons on category codes.

[0104] The reference interval adaptation verification reads the target object attributes according to the selection rules stored in the feature mapping table and confirms that the reference interval used for threshold restoration is consistent with the rules used in the training phase. If an indicator has more than two candidate reference intervals, a unique applicable reference interval is selected based on the attribute matching priority; if a unique reference interval cannot be determined, the model space threshold and the standardized target value are retained, but the output of the original unit threshold is paused, and this condition is marked as a reference interval for further verification. This process is more effective than directly using the default reference interval in preventing the incorrect restoration of the threshold meaning.

[0105] Missing value branch consistency checks three facts simultaneously: whether the missing value flag in the target standardized feature vector is valid, whether the tree node is configured with a default direction for missing values, and whether the actual branch in the path record is equal to this default direction. When these three facts are consistent, the path condition is expressed as "the corresponding indicator is missing and enters the child node along the preset default direction," rather than as a normal numerical comparison. If the target feature has valid values, the node's contribution cannot be explained by the default direction for missing values. By distinguishing between missing branch conditions and numerical comparison conditions, the "missing" error can be avoided from being converted into a zero value or other filled value condition.

[0106] The professional rationality constraint runs after the numerical satisfiability constraint passes. Its purpose is not to regenerate the recorded target interpretation label, but to determine whether the candidate tracing logic chain is compatible with the preset professional rules and historical manual interpretation patterns. Directional constraints are used to determine whether the comparison direction is consistent with the historical support direction of the target label; compatibility constraints are used to identify whether there is a clear exclusionary relationship between a single physical examination indicator and the target label; combination constraints are used to identify whether two or more conditions are mutually exclusive when used as the basis for the same direction; and applicability constraints are used to determine whether a certain condition is only applicable to a specific combination of attributes. All of the above constraints are saved as structured entries, and the matching results can be traced back to the specific entry identifier.

[0107] In this embodiment of the invention, hard violations and soft deviations are treated with different data processing consequences. A hard violation indicates that the candidate chain has a deterministic conflict under the current constraint library version, and is therefore removed from the set of post-constraint traceability logical chains. A soft deviation indicates that the candidate chain is still valid, but lacks sufficient support in terms of historical frequency, common interval positions, or path structure, and is therefore retained and multiplied by a weighting factor. This differentiated processing avoids treating all deviations as errors and also avoids retaining logical chains with deterministic conflicts solely based on continuous scoring.

[0108] For example, a candidate source tracing logic chain contains lower and upper bound conditions for indicator I05. After unit conversion, the lower bound is 8.0 and does not include the boundary, while the upper bound is 7.5 and includes the boundary. Therefore, the indicator constraint interval is empty, and the numerical satisfiability constraint directly deletes this logic chain, preventing it from entering the professional rationality constraint. Another logic chain passes all numerical verifications, and its indicator direction is compatible with the target label. However, the corresponding indicator combination only appears a small number of times in the historical records. In this case, there is no hard professional violation, and the system retains this logic chain, determining the weighting coefficient based on historical frequency and structural distance. These two examples demonstrate the processing order of first eliminating deterministic data contradictions and then evaluating the degree of professional compatibility.

[0109] Through two-stage constraints, the model source, numerical validity, and professional compatibility of candidate chains are verified separately. Model path can explain where the conditions come from, but cannot guarantee the non-emptiness of intervals for cross-tree combinations; numerical satisfiability can eliminate basic contradictions, but cannot indicate that the direction and combination of conditions conform to professional rules; professional rationality is further screened based on the first two. The three types of evidence are stored hierarchically, so that any elimination or deweighting action has a locatable cause record.

[0110] Example 7

[0111] This embodiment provides a calculable implementation of professional hard violation, professional soft deviation, and weighting coefficient.

[0112] Each numerical value satisfies a logical chain by encoding a constraint vector. The logical chain constraint vector includes standard index encoding, comparison direction encoding, index constraint interval encoding, combination relationship encoding, and applicable object attribute encoding. The constraint matcher reads the directional constraints, compatibility constraints, combination constraints, and applicable object constraints associated with the recorded target interpretation labels from the professional rationality constraint library, and generates matching values ​​item by item. Hard constraint matching values ​​are in binary form, either conflicting or non-conflicting, while soft constraint matching values ​​are continuous values ​​between 0 and 1.

[0113] If any hard constraint match value indicates a conflict, the corresponding logic chain is marked as a professional hard violation. If all hard constraint match values ​​are non-conflicting, a professional compatibility score is calculated:

[0114] Equation (6)

[0115] in, Represents the candidate tracing logic chain Professional compatibility score; Indicates the number of soft constraints involved in the scoring; Indicates the sequence number of the soft constraint item; Indicates the first The non-negative weights of each soft constraint term; Represents the candidate tracing logic chain In the The matching values ​​for each soft constraint term range from 0 to 1. Each non-negative weight can be determined based on the validation data or preset according to the order of importance of the constraint terms, while keeping the denominator greater than 0.

[0116] When the professional compatibility score reaches the preset retention condition, the candidate traceability logic chain is not reduced in weight; when the score does not reach the preset retention condition but there is no hard violation of professional rules, the professional compatibility score or its monotonic mapping value is used as the weight reduction coefficient. The preset retention condition can be set to 0.60 to 0.90. In order to avoid the historical manual interpretation mode being repeatedly calculated in the subsequent comprehensive fidelity, the soft constraint term in equation (6) can only include directional compatibility, index compatibility, combination compatibility and applicable object compatibility, and the historical mode related terms are separately included in the historical manual interpretation mode matching degree.

[0117] In other implementations, the professional rationality constraint library can be stored using a relational table, knowledge graph structure, or versionable rule file, as long as it can read the direction, compatibility, combination, and applicable object constraints associated with the recorded target interpretation labels. The constraint library version number, along with the constraint matching results, is written to the elimination record or the deweighting record to ensure that the processing results under the same model and the same constraint library version are reproducible.

[0118] Example 8

[0119] This embodiment illustrates the output of local fidelity, overall fidelity, and target interpretation logic tracing chain.

[0120] The target response increment of the recorded target label c is defined as the difference between the model response and the model's expected response. For the candidate source tracing logic chain q, the local contributions of the nodes retained in the chain are accumulated as the logic chain contribution increment. Local fidelity can be expressed as:

[0121] Equation (7)

[0122] in, Represents the candidate tracing logic chain Local fidelity; This indicates that the target interpretation label has been recorded. The target response increment, and ; The meaning is the same as that of equation (1); This represents a random input vector formed by historical standardized feature vectors; This indicates that the target interpretation label has been recorded. The model expects the response; Represents the candidate tracing logic chain The sum of the retained node-level local contributions; This represents the first smoothing constant to prevent the denominator from being zero, and its value can be 1. to ; This represents the absolute value operation; This indicates taking the larger value between the value inside the parentheses and 0.

[0123] Overall fidelity can be expressed as:

[0124] Equation (8)

[0125] in, Represents the candidate tracing logic chain Overall fidelity; The meaning is the same as that of equation (7); The meaning is the same as that of equation (6); Indicates the degree of consistency between historical manual interpretation patterns; This indicates the stability score; This indicates that the match is explicitly based on the score. , , , and These represent the non-negative combination weights of the aforementioned five scores, with the sum of all non-negative combination weights being 1. If no explicit basis record exists, then... Set the weights to 0 and normalize the weights of the remaining non-negative combinations.

[0126] The consistency of historical human interpretation patterns is determined based on the similarity between the set of indicators used in the logical chain, the indicator constraint intervals, and the primary and secondary structure of conditions, and the statistical results of historical human interpretation records. The stability score is obtained through model retraining, training sample resampling, or perturbation testing of adjacent feature samples; the closer the recurrence rate of path condition items in the same candidate chain is to 1, the closer the corresponding stability score is to 1. Explicit basis matching scores are only enabled when historical human interpretation tags are associated with structured basis records or parsed text basis records.

[0127] The sorter arranges the constrained traceability logic chains in descending order according to their overall fidelity, outputting a preset number of target interpretation logic traceability chains. The preset number can be 2 to 10. Each output chain includes a health check index, target value, applicable reference range, comparison relationship, restoration threshold, combination relationship, node-level local contribution, source tree identifier, numerical satisfiability verification result, professional rationality verification result, and overall fidelity. The system also displays "This output is used to trace the data processing basis of the recorded target interpretation labels," thus clarifying the relationship between the model interpretation results and the original labels.

[0128] The local fidelity is used to quantify the extent to which the node-level local contributions retained by the candidate tracing logic chain cover the target response increment. The comparison objects are two response increments under the same recorded target interpretation label, the same target standardized feature vector, and the same model version, thus avoiding mixing and comparing probability values ​​of different labels, original response values ​​of different output scales, or expected responses of different model versions. The first smoothing constant in equation (7) only stabilizes the denominator when the target response increment is close to zero, without changing the sign and sorting direction of the candidate chain contribution increments.

[0129] When the target response increment and the logical chain contribution increment are in the same direction and have a small difference, the local fidelity is close to 1. When the candidate chain deletes many key conditions or the contribution direction of the retained conditions is opposite to the target response increment, the local fidelity decreases. For cases where the absolute value of the target response increment is lower than the preset response tolerance, the sample can be marked as having a model response close to the expected value, and only the complete true path can be output or the lower limit of the contribution retention ratio can be increased to avoid amplifying a small response increment by a small amount of numerical error.

[0130] Overall fidelity is not a deterministic reproduction of the internal thought process of a particular artificial subject, but rather a measure of consistency between the candidate source logic chain and the model's local response, professional constraints, historical human interpretation patterns, and interpretative stability. Local fidelity answers "how much of the model response is retained by the candidate chain," professional compatibility score answers "whether the candidate chain is compatible with preset professional rules," historical human interpretation pattern matching score answers "whether the candidate chain has similar indicator sets and conditional structures in historical records," interpretative stability score answers "whether the candidate chain recurs when the model or samples undergo finite changes," and explicit basis matching score provides additional calibration when corresponding records exist. Each component has different input sources, thus reducing the duplication of the same information in the overall fidelity.

[0131] The non-negative combination weights in equation (8) can be determined through validation data. In specific implementation, the validation data includes the target structured physical examination data, the recorded target interpretation labels, and optional explicit evidence records. The system searches for weight combinations while keeping the sum of the weights of each non-negative combination at 1, so that the candidate chains ranked higher achieve the preset evaluation targets in terms of contribution coverage, constraint pass rate, and explicit evidence matching. When explicit evidence records are missing, the sub-item is not constructed based on unobserved information, but the corresponding non-negative combination weight is set to 0 and the remaining weights are renormalized. This can distinguish between two different situations: "no explicit evidence data" and "low degree of explicit evidence matching".

[0132] Interpretive stability can be calculated from three levels. First, model retraining stability compares the proportion of conditional recurrence in models trained with different random seeds or resampling under the same training configuration. Second, adjacent feature sample stability applies a finite perturbation to the target standardized feature vector without changing the recorded target interpretation label, comparing whether the path condition term is preserved. Third, threshold cluster stability compares whether the thresholds for the same standard indicator encoding and the same comparison direction still fall into similar threshold clusters before and after the model version update. One level or a combination of two or more levels can be selected based on the actual data conditions. The selected level and calculation results are all recorded in the interpretation log.

[0133] When the overall fidelity difference between two candidate source tracing logic chains does not exceed the preset sorting tolerance, local fidelity, numerical satisfiability verification completeness, real path source priority, and number of condition items can be used as the parallel sorting criteria in sequence. The source priority of a complete real path is higher than that of contribution-preserved projections, and the source priority of contribution-preserved projections is higher than that of cross-tree combinations that only have statistical co-occurrence support. When source priorities are the same and contribution coverage is similar, candidate chains with fewer condition items are prioritized to improve output readability. This parallel sorting rule only affects the display order and does not change the scores of each sub-item.

[0134] Furthermore, each source tracing task can save an interpretation record. The interpretation record includes the source tracing task identifier, model version, feature mapping table version, professional rationality constraint library version, recorded target interpretation labels, local decision paths, node-level local contributions, candidate chain construction records, elimination records, weight reduction records, and overall fidelity. After the model or constraint library is updated, source tracing can be re-executed on the same target structured health check data, and the source of condition changes can be compared through the version field, thereby distinguishing between model structure changes, field mapping changes, and professional constraint changes.

[0135] The aforementioned hierarchical scoring and recording method makes the ranking results decomposable. If the ranking of a certain logical chain declines, users can determine whether it is due to insufficient contribution coverage, reduced professional compatibility, decreased consistency with historical patterns, or insufficient stability, rather than simply receiving a total score lacking sources. Therefore, overall fidelity serves both the function of ranking candidate chains and the function of providing structured explanations of different quality dimensions.

[0136] In a de-identified example, the target interpretation label is recorded as label LA. The target structured physical examination data includes the value of indicator I01 as 6.2 and the applicable reference range of 0.3 to 4.2, and the value of indicator I02 as 9.8 and the applicable reference range of 12 to 22. The true path of the first tree contains "I01 greater than 4.2" and "I02 less than 12", with corresponding node-level local contributions of 0.18 and 0.14. The true path of the second tree contains "I01 greater than 5.0" and category indicator I03 belonging to set {C1, C2}, with corresponding node-level local contributions of 0.16 and 0.12. After interval, unit, category set, and professional direction verification, the system outputs two target interpretation logical traceability chains, and gives comprehensive fidelity of 0.90 and 0.84 respectively. This example is only used to demonstrate the data flow and sorting process; the indicator codes and values ​​are constructed data.

[0137] Example 9

[0138] This embodiment provides a method for generating historical standardized feature vectors and target standardized feature vectors.

[0139] Structured physical examination data can be represented as JSON objects, relational table records, or field key-value sequences. The indicator coding mapping table maps raw indicator identifiers from different data sources to standard indicator codes; unit conversion relationships convert convertible raw values ​​into model standard unit values. Data items whose unit conversion relationships cannot be confirmed are marked with a unit uncertainty flag and do not directly participate in the generation of path conditions requiring numerical threshold comparisons.

[0140] Specifically, a structured health checkup dataset may include report-level fields, target object attribute fields, and an array of indicator items. Report-level fields store the data source identifier, data generation time, and field version; target object attribute fields store the attribute codes required for reference range selection; each element in the indicator item array stores the original indicator identifier, original indicator name, target value, original unit, lower bound of the reference range, upper bound of the reference range, category value, and applicable fields for missing status. After data access, field types and required fields are first validated, and then the indicator code mapping table is queried based on the combination of the original indicator identifier and the original indicator name to avoid homonyms or synonyms caused by relying solely on name strings.

[0141] For numerical physical examination indicators, unit conversion relationships can be represented as proportional conversions or affine conversions with offsets. The converted model standard unit values, conversion relationship identifiers, and original values ​​are simultaneously saved so that reverse verification can be performed when the path threshold returns from the model space to the original data. For unitless proportional values, score values, or category codes, the feature mapping table marks their unit type as dimensionless or categorical to prevent incorrect invocation of numerical conversion relationships during unit consistency checks.

[0142] The reference interval selection rule is jointly indexed by the standard indicator code and the target object attributes. If the structured physical examination data already carries a valid reference interval, the data type, upper and lower bounds, and span of the reference interval are first checked; if no reference interval is carried, the interval matching the target object attributes is read from the preset reference interval table. When the carried interval and the preset interval exist simultaneously but are inconsistent, the intervals from the same source used in the training phase can be used first, and the differences are written into the data quality flag. This data quality flag is passed along with the target standardized feature vector to the threshold restoration and numerical satisfiability verification stages.

[0143] Categorical health indicators retain a bidirectional mapping between the original set of category values ​​and the model category codes. New category values ​​not present in the training data are mapped to a preset unknown category code, and a category-unseen label is generated; new category values ​​must not be arbitrarily mapped to existing categories. For missing data, missing labels and imputation values ​​are stored separately: even if preset imputation values ​​are used during model training for ease of numerical calculation, the path resolution stage still restores the semantics of the "missing branch" based on the missing labels and the default direction of the missing tree node values, without interpreting the imputation values ​​as the true target values.

[0144] Data cleaning can also include duplicate record identification, obvious formatting error identification, and time consistency verification. Duplicate records are identified based on a combination of data source identifier, report-level identifier, and indicator item identifier. When there are more than two valid records for the same indicator in the same report, the records selected for model input are chosen according to preset version priority or time priority, and the remaining records are retained as data quality information. For fields that cannot be converted to the target data type, they are not replaced with zero values, but rather missing value or type error flags are generated to prevent human-added values ​​from becoming false basis for splitting the tree model.

[0145] For standard index coding The relative position of the reference interval can be represented as:

[0146] Equation (9)

[0147] in, Indicates standard indicator code The relative position of the reference interval for the corresponding value; This indicates the converted standard unit value of the model; This indicates the upper bound of the applicable reference range selected based on the target object's attributes; Indicates the lower bound of the applicable reference interval; This indicates the midpoint of the applicable reference interval; Indicates the standard indicator code number. Applicable reference range span. The span must be greater than 0. If this condition is not met, an invalid reference interval flag is generated and the calculation is stopped. .

[0148] In addition to the relative position within the reference interval, it can also generate relative multiples exceeding the upper bound, relative multiples below the lower bound, anomaly direction codes, category codes, and missing value flags. For gradient boosting tree models that natively support category features, the category values ​​can be directly saved as set splitting conditions; for models using numerical encoding, the feature mapping table simultaneously saves the correspondence between category codes and original category values ​​for reconstruction during the path resolution stage.

[0149] The feature mapping table should at least include the model input column, standard indicator code, original indicator identifier, model standard unit, applicable reference interval selection rule, category mapping relationship, and missing value column. When the same target structured physical examination data is associated with multiple recorded target interpretation labels, the target standardized feature vector is shared, but the tree group corresponding to each target label is read separately, and the model response, local decision path, candidate source tracing logic chain, and target interpretation logic source tracing chain are calculated separately, thus avoiding the mixing of paths and contributions between different labels from a data structure perspective.

[0150] In other implementations, reference interval normalization can also employ piecewise linear mapping, quantile mapping, or robust standardization based on historical data distribution, as long as the same transformation is used in the training and source tracing phases, and the model space threshold can be restored to the original unit threshold or the relative threshold of the reference interval through the feature mapping table.

[0151] Example 10

[0152] like Figure 5 As shown, this embodiment provides a source tracing device for physical examination report interpretation logic based on gradient boosting tree, including a data acquisition module, a model response module, a local contribution module, a candidate chain construction module, a constraint processing module, and a source tracing output module.

[0153] The data acquisition module is used to acquire historical standardized feature vectors, target standardized feature vectors, corresponding historical manual interpretation labels, and recorded target interpretation labels.

[0154] The model response module is used to train a gradient boosting tree model based on the historical standardized feature vector and the historical manually interpreted labels, and input the target standardized feature vector into the gradient boosting tree model to obtain the model response of the recorded target interpreted labels.

[0155] The local contribution module is used to extract the local decision path that the target standardized feature vector passes through in the tree group corresponding to the recorded target interpretation label, and to calculate the node-level local contribution of the split node.

[0156] The candidate chain construction module is used to construct a set of candidate tracing logic chains based on the local decision path and the node-level local contribution.

[0157] The constraint processing module is used to eliminate or reduce the weight of the candidate traceability logic chain set by using numerical satisfiability constraints and professional rationality constraints, so as to obtain the constrained traceability logic chain set.

[0158] The tracing output module is used to determine the comprehensive fidelity based on the local fidelity of the model response to the set of constrained tracing logic chains, and output several target interpretation logic tracing chains according to the comprehensive fidelity.

[0159] The aforementioned modules can be implemented as software functional units running on the same processor, or deployed across multiple computing nodes connected via data interfaces. The data acquisition module and the model response module exchange feature vectors and labels; the model response module transmits the model version, corresponding tree group, and model response to the local contribution module; the local contribution module transmits node contribution records with path source identifiers to the candidate chain construction module; the candidate chain construction module transmits the candidate tracing logical chain set to the constraint processing module; and the constraint processing module transmits the constrained tracing logical chain set, along with discarded and deweighted records, to the tracing output module. This forms a closed-loop data processing mechanism corresponding to the method steps.

[0160] The data interface between modules uses structured messages containing task identifiers and version identifiers. The task identifier is used to associate the model response, local decision path, and candidate tracing logic chain in the same tracing process; the version identifier includes at least the model version, feature mapping table version, and professional rationality constraint library version. When downstream modules receive data, they verify whether the task identifier and the required version are consistent. If the verification fails, the current task is stopped and a version inconsistency status is returned to prevent different versions of paths, thresholds, and constraint records from being mixed and processed.

[0161] Optionally, the local contribution module extracts the actual tree-level path and calculates the node-level local contribution in parallel according to the tree identifier. After all tree-level processing is completed, the merging result is determined based on the recorded target judgment labels. Parallel processing only changes the execution order of tree-level tasks, without changing the path order from the root node to the leaf node within each tree. The candidate chain construction module uses the tree identifier and node identifier to restore the deterministic merging order, thereby ensuring that single-threaded and parallel implementations can obtain the same set of candidate tracing logical chains.

[0162] When a tree structure lacks node coverage, the feature mapping table cannot reconstruct the actual model input columns, or the professional rationality constraint library is temporarily unavailable, the device saves the corresponding abnormal state. When node coverage is missing, the expected output of the node can be read if the model supports it; when the model input columns cannot be reconstructed, readable path condition items containing those columns are not output; when the professional rationality constraint library is unavailable, the generation of comprehensive fidelity ranking results is stopped, and candidate chains that have not undergone professional rationality constraints are not marked as passed. The above abnormal handling ensures that the module output state remains consistent with the actual completed verification range.

[0163] Example 11

[0164] This embodiment provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the method described in any of embodiments 1 to 9.

[0165] Computer-readable storage media can be read-only memory, random access memory, solid-state memory, disk storage, optical storage, or other non-transitory media capable of storing processor-executable instructions. A computer program can be divided into multiple instruction segments according to data standardization, model response, local contribution, candidate chain construction, constraint processing, and source tracing output. After being loaded by the processor, each instruction segment works together to generate the target determination logic source tracing chain.

[0166] The storage medium can also save model version identifiers, feature map table version identifiers, professional rationality constraint library version identifiers, and source tracing task identifiers, enabling the same historical interpretation record to be recalculated under specified version conditions. Saving this version information is only used to ensure the reproducibility of the data processing process and does not impose restrictions on the specific software implementation of the gradient boosting tree model.

[0167] Example 12

[0168] This embodiment provides an electronic device, including a memory and a processor. The memory stores a computer program, which, when executed by the processor, implements the method described in any one of embodiments 1 to 9.

[0169] The electronic device may also include a communication interface, a data interface, and a display interface. The communication interface is used to receive historical structured physical examination data, target structured physical examination data, and corresponding tag data; the data interface is used to access the gradient boosting tree model, feature mapping table, and professional rationality constraint library; the display interface is used to output the target judgment logic traceability chain and its comprehensive fidelity, source true path identifier, and constraint verification record. The processor can be a central processing unit, graphics processing unit, application-specific integrated circuit, or programmable logic device, and the memory is connected to the processor via a bus.

[0170] In the distributed implementation, model training can be performed on the first computing node, local decision path extraction and node-level local contribution calculation can be performed on the second computing node, and the two-stage constraints and comprehensive fidelity ranking of the candidate source tracing logic chain can be performed on the third computing node. Each computing node maintains data consistency through model version identifiers, feature mapping table version identifiers, and source tracing task identifiers. Regardless of whether a single-machine or distributed implementation is used, the processing endpoint is the target interpretation logic source tracing chain with recorded target interpretation labels.

Claims

1. A method for tracing the logical source of physical examination report interpretation based on gradient boosting tree, characterized in that, Applications include: processing of medical examination report data Obtain historical standardized feature vectors, target standardized feature vectors, corresponding historical manual interpretation labels, and recorded target interpretation labels; A gradient boosting tree model is trained based on the historical standardized feature vector and the historical manually interpreted labels. The target standardized feature vector is then input into the gradient boosting tree model to obtain the model response to the recorded target interpreted labels. The historical standardized feature vector and the target standardized feature vector are obtained by performing standardization processing on the historical structured physical examination data and the target structured physical examination data. Extracting the local decision path traversed by the target standardized feature vector within the tree group corresponding to the recorded target interpretation labels, and calculating the node-level local contribution of the split nodes, includes: determining the corresponding tree group in the gradient boosting tree model based on the recorded target interpretation labels; selecting child nodes from the root node according to the default direction of the feature values ​​and missing values ​​of the target standardized feature vector; recording the traversed split nodes, the actual branch direction of the samples, and the leaf nodes to form the actual tree-level path; using a feature mapping table to restore the model input columns in the actual tree-level path to physical examination indicators, and restoring the model space threshold to the original value. The initial unit threshold or reference interval relative threshold is used; the output of the leaf node is weighted using the training sample coverage or leaf weight of the leaf node in the current node subtree that reaches the split node to obtain the expected output of the current node subtree; the output of the leaf node is weighted using the training sample coverage or leaf weight of the leaf node in the subtree that actually enters the child node to obtain the expected output of the subtree that actually enters the child node; the node-level local contribution is determined based on the expected output of the current node subtree and the expected output of the subtree that actually enters the child node, and the local decision path is formed by the actual tree-level path and its node-level local contribution; Constructing a candidate tracing logic chain set based on the local decision path and the node-level local contribution includes: converting the split nodes in the local decision path into path condition items containing health check indicators, comparison relationships, model space thresholds, restoration thresholds, target values, node-level local contributions, and path source identifiers; grouping path condition items belonging to the same tree-level actual path into a true path condition sequence according to the path source identifier; merging intervals of the comparison relationships belonging to the same health check indicator in the true path condition sequence to obtain indicator constraint intervals; filtering the path condition items in the true path condition sequence according to the node-level local contribution to form a contribution retention projection; statistically analyzing the co-occurrence frequency and threshold distribution of path condition items among different contribution retention projections; and combining the true path condition sequence, the contribution retention projection, and the path condition items that satisfy the co-occurrence frequency condition as candidate tracing logic chains to form the candidate tracing logic chain set. The candidate source tracing logic chain set is eliminated or reduced in weight by using numerical satisfiability constraints and professional rationality constraints to obtain a constrained source tracing logic chain set. Based on the local fidelity of the model response to the set of constrained tracing logic chains, the overall fidelity is determined, and several target interpretation logic tracing chains are output according to the overall fidelity.

2. The method according to claim 1, characterized in that, The step of determining the node-level local contribution based on the expected output of the current node's subtree and the expected output of the subtree that actually enters the child node, and forming the local decision path from the actual tree-level path and its node-level local contribution, includes: The difference between the expected output of the subtree that actually enters the child node and the expected output of the subtree of the current node is calculated to obtain the conditional marginal contribution of the corresponding split node. The conditional marginal contributions of the split nodes along the actual path of the tree level are accumulated to obtain the path contribution sum value; The path contribution and value are checked for consistency with the increment of the output reaching the leaf node relative to the expected output of the root node subtree; When the consistency check passes, the conditional marginal contribution is determined as the node-level local contribution; If the consistency check fails, the expected output of the current node subtree and the expected output of the subtree that actually enters the child node are recalculated based on the node coverage relationship.

3. The method according to claim 1, characterized in that, The step of combining the true path condition sequence, the contribution-preserving projection, and the path condition terms that satisfy the co-occurrence frequency condition as candidate tracing logic chains to form the candidate tracing logic chain set includes: Group the path condition items in the projection of different contributions according to the physical examination indicators and comparison directions; The restoration threshold of each set of path condition items is converted to the relative coordinates of the corresponding reference interval; Based on the distance between the relative coordinates, threshold clustering is performed on the path condition terms in the same group to obtain threshold clusters and the intervals represented by the threshold clusters. Statistically analyze the frequency of single occurrence and co-occurrence frequency of path condition terms corresponding to different threshold clusters in the actual path condition sequence; The path condition item combinations whose co-occurrence frequencies satisfy the preset co-occurrence frequency conditions are retained to obtain candidate path condition item combinations; Perform a non-empty check on the index constraint interval for the candidate path condition item combination, and add the candidate path condition item combination to the candidate tracing logic chain set after the check passes; Associate each candidate source tracing logic chain with its source real path identifier, retained node-level local contribution, and co-occurrence frequency to prevent cross-tree condition combinations that lack real path or co-occurrence data support from entering the candidate source tracing logic chain set.

4. The method according to claim 1, characterized in that, The process of eliminating or reducing the weight of the candidate source tracing logic chain set using numerical satisfiability constraints and professional rationality constraints yields a constrained source tracing logic chain set, including: Obtain the physical value range, unit conversion relationship, applicable reference interval, category value set, and missing value branch information for each physical examination indicator; For each candidate tracing logic chain, the following checks are performed sequentially: value range verification, index constraint interval intersection verification, unit consistency verification, reference interval adaptation verification, category value verification, and missing value branch consistency verification. Eliminate candidate source logic chains or corresponding path condition terms that have numerical hard violations to obtain a set of logic chains that can be satisfied numerically. Load a professional rationality constraint library containing the directional relationship, compatibility relationship, indicator combination relationship, applicable object relationship and historical manual interpretation mode between indicators and recorded target interpretation labels; Using the aforementioned professional rationality constraint library, we can identify whether the numerical values ​​satisfy the professional hard violations and professional soft deviations in the logic chain set; The set of constraint-based source logic chains is obtained by removing those with hard professional violations and reducing the weight of those with only soft professional deviations.

5. The method according to claim 4, characterized in that, The process of using the professional rationality constraint library to identify whether the numerical values ​​satisfy the professional hard violations and professional soft deviations in the logical chain set includes: Encode each value into a logical chain constraint vector, which includes the physical examination indicators, comparison direction, indicator constraint range, indicator combination, and applicable object attributes that can be satisfied in the logical chain. Read the directional constraints, compatibility constraints, combination constraints, and applicable object constraints associated with the recorded target interpretation labels from the professional rationality constraint library; The logical chain constraint vector is matched item by item with the directional constraint, the compatibility constraint, the combined constraint, and the applicable object constraint to form a constraint matching result; When the constraint matching results indicate conflicting directions, explicit incompatibility, mutually exclusive conditions serving as the basis for the same direction, or mismatched applicable objects, it is determined that the aforementioned professional hard violation exists; When the constraint matching result does not contain the professional hard violation and the frequency of the indication does not reach the first frequency condition, the index value is located at the edge of the historical common interval, or the path structure deviates from the historical common structure, it is determined that the professional soft deviation exists. The weighting coefficient corresponding to the professional soft deviation is determined based on the historical frequency of occurrence, the deviation from the historically commonly used interval, and the structural distance from the historically common structure.

6. The method according to claim 1, characterized in that, The step of determining the overall fidelity based on the local fidelity of the model response to the constrained set of tracing logic chains, and outputting several target interpretation logic tracing chains according to the overall fidelity, includes: Obtain the target response increment of the model response relative to the model's expected response with the recorded target interpretation labels; The node-level local contributions retained by each constrained source tracing logic chain are accumulated to obtain the logic chain contribution increment; The local fidelity is determined based on the difference between the target response increment and the logical chain contribution increment; The overall fidelity is determined based on at least two of the following: local fidelity, professional compatibility score, historical manual interpretation pattern consistency, interpretation stability score, and explicit basis matching score. The explanation stability score is determined based on the recurrence of corresponding path condition terms under model retraining, training sample resampling, or adjacent feature samples. The explicit basis matching score is enabled when there is an explicit basis record associated with historical manually interpreted labels. The constrained traceability logic chain set is sorted according to the overall fidelity, and the first preset number of constrained traceability logic chains are converted into the target judgment logic traceability chain.

7. The method according to claim 1, characterized in that, The standardization process includes: Based on the indicator code mapping table, the indicator identifiers of different data sources are converted into standard indicator codes; Based on the unit conversion relationship, the original values ​​of the physical examination indicators are converted into the model standard unit values; Select an applicable reference interval based on the target object attributes, and calculate the relative position, abnormal direction, or abnormal multiple of the model standard unit value within the applicable reference interval; Categorical physical examination indicators are categorized and coded, and missing indicators are generated. Save the feature mapping table between the model input columns, standard indicator codes, original indicator identifiers, model standard units, and applicable reference intervals.

8. A logic tracing device for interpreting physical examination reports based on gradient boosting trees, characterized in that, include: The data acquisition module is used to acquire historical standardized feature vectors, target standardized feature vectors, corresponding historical manual interpretation labels, and recorded target interpretation labels; The model response module is used to train a gradient boosting tree model based on the historical standardized feature vector and the historical manually interpreted labels, and input the target standardized feature vector into the gradient boosting tree model to obtain the model response to the recorded target interpreted labels. The historical standardized feature vector and the target standardized feature vector are obtained by performing standardization processing on the historical structured physical examination data and the target structured physical examination data. The local contribution module is used to extract the local decision paths traversed by the target standardized feature vector within the tree group corresponding to the recorded target interpretation labels, and to calculate the node-level local contribution of the split nodes. This includes: determining the corresponding tree group in the gradient boosting tree model based on the recorded target interpretation labels; selecting child nodes from the root node according to the default direction of the feature values ​​and missing values ​​of the target standardized feature vector; recording the traversed split nodes, the actual branch direction of the samples, and the leaf nodes to form the actual tree-level path; and using a feature mapping table to restore the model input columns in the actual tree-level path to physical examination indicators, and setting the model space threshold. The threshold is restored to the original unit threshold or the relative threshold of the reference interval; the output of the leaf node is weighted using the training sample coverage or leaf weight of the leaf node in the current node subtree that reaches the split node to obtain the expected output of the current node subtree; the output of the leaf node is weighted using the training sample coverage or leaf weight of the leaf node in the subtree that actually enters the child node to obtain the expected output of the subtree that actually enters the child node; the node-level local contribution is determined based on the expected output of the current node subtree and the expected output of the subtree that actually enters the child node, and the local decision path is formed by the actual tree-level path and its node-level local contribution; A candidate chain construction module is used to construct a set of candidate tracing logic chains based on the local decision path and the node-level local contribution. This includes: converting split nodes in the local decision path into path condition items containing health check indicators, comparison relationships, model space thresholds, restoration thresholds, target values, node-level local contributions, and path source identifiers; grouping path condition items belonging to the same tree-level actual path according to the path source identifier into a true path condition sequence; merging intervals of comparison relationships belonging to the same health check indicator in the true path condition sequence to obtain indicator constraint intervals; filtering path condition items in the true path condition sequence according to node-level local contributions to form contribution retention projections; statistically analyzing the co-occurrence frequency and threshold distribution of path condition items among different contribution retention projections; and combining the true path condition sequence, the contribution retention projections, and path condition items satisfying the co-occurrence frequency condition as candidate tracing logic chains to form the candidate tracing logic chain set. The constraint processing module is used to eliminate or reduce the weight of the candidate traceability logic chain set using numerical satisfiability constraints and professional rationality constraints, so as to obtain a constrained traceability logic chain set. The tracing output module is used to determine the comprehensive fidelity based on the local fidelity of the model response to the set of constrained tracing logic chains, and output several target judgment logic tracing chains according to the comprehensive fidelity.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 7.

10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the computer program is executed by the processor, it implements the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • AI agent output result credibility evaluation and traceability tracking system

    CN122240513A