Medical text processing method and device based on anti-fact causal reasoning
By constructing a statement-evidence causal graph and a counterfactual causal reasoning method with dynamic debiasing coefficients, the problem of insufficient causal relationship analysis in existing technologies is solved, improving the accuracy and reliability of medical text processing and adapting to dynamic scenarios with multi-source data.
Patent Information
- Application Number
- CN202510995465.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2025-12-09
AI Technical Summary
Existing technologies in medical text processing rely too heavily on surface-level linguistic relevance and neglect in-depth causal analysis, resulting in low accuracy of output results.
We employ a counterfactual causal reasoning approach, constructing a statement-evidence causal graph to decompose the total causal effect into natural direct effects and total indirect effects. We then combine this with dynamic debiasing coefficients for comprehensive analysis, optimizing the model debiasing process during the training and inference phases.
It improves the accuracy and robustness of medical text output results, ensures the precision and reliability of diagnostic or treatment decisions, adapts to differences in the distribution of multi-source data and adversarial misinformation, and enhances the model's adaptability and interpretability.
Smart Images

Figure BDA0005507131210000091 
Figure BDA0005507131210000092 
Figure BDA0005507131210000111
Abstract
Description
Technical Field
[0001] This application relates to the field of computer information technology, and more specifically, to a medical text processing method and apparatus based on counterfactual causal reasoning. Background Technology
[0002] In the medical field, with the rapid growth of massive amounts of medical texts such as clinical literature, electronic medical records, and medical guidelines, accurately identifying and verifying the authenticity of medical statements (such as disease diagnoses, treatment plans, and drug interactions) is particularly important. However, in existing technologies, models often rely excessively on the superficial linguistic relevance between statements and labels (such as "support" and "refute") during the training and inference phases, treating frequently co-occurring keywords as "shortcut" features and neglecting in-depth causal relationship analysis. Therefore, bias-reduction processing is usually performed on the output results.
[0003] Existing bias correction methods typically use fixed weights to adjust the analysis results, but this method results in low accuracy of the output. Summary of the Invention
[0004] This application provides a medical text processing method and apparatus based on counterfactual causal reasoning, which can analyze data from factual and counterfactual scenarios, determine the total effect, natural direct effect, total indirect effect, and debiasing coefficient, and then perform comprehensive analysis to obtain verification output results, thereby improving the accuracy of the verification output results.
[0005] The technical solution is as follows:
[0006] In a first aspect, this application provides a medical text processing method based on counterfactual causal reasoning. The method includes: determining a first statement and first evidence based on the medical text, and generating a first feature map to determine a first path based on the first statement and first evidence; obtaining a second statement and second evidence of counterfactual intervention, and generating a second feature map to determine a second path based on the second statement and second evidence; determining the total effect, natural direct effect, and total indirect effect based on the first statement, first evidence, first path, second statement, second evidence, and second path, and determining the biased coefficient; and determining the verification output result corresponding to the medical text based on the total effect, natural direct effect, and biased coefficient.
[0007] Furthermore, the step of generating a first feature map based on the first statement and the first evidence to determine the first path includes: generating feature nodes based on the first statement and the first evidence and performing feature aggregation and convolution processing to obtain the first feature map; and analyzing the walking probability of each feature node based on the feature node corresponding to the first statement in the first feature map as the starting point to form the first path.
[0008] Furthermore, the step of determining the total effect, natural direct effect, and total indirect effect based on the first statement, first evidence, first path, second statement, second evidence, and second path, in order to determine the biased coefficient, includes: inputting the first statement, first evidence, and first path into the inference framework to determine the first analysis result; inputting the second statement, second evidence, and second path into the inference framework to determine the second analysis result; inputting the first statement, second evidence, and second path into the inference framework to determine the third analysis result; and determining the total effect, natural direct effect, and total indirect effect based on the first analysis result, second analysis result, and third analysis result, in order to determine the biased coefficient.
[0009] Furthermore, the reasoning framework is used to determine the analysis result based on the following steps: extracting statement features based on the statement to determine the first intermediate result; extracting evidence features based on the evidence to determine the second intermediate result; fusing node features based on the path corresponding to the feature map to determine the third intermediate result; and performing fusion analysis based on the first intermediate result, the second intermediate result, and the third intermediate result to determine the analysis result.
[0010] Furthermore, determining the total effect, natural direct effect, and total indirect effect based on the first analysis results, the second analysis results, and the third analysis results, in order to determine the biased coefficient, includes: determining the total effect based on the first analysis results and the second analysis results; determining the natural direct effect based on the second analysis results and the third analysis results; determining the total indirect effect based on the total effect and the natural direct effect; and determining the biased coefficient based on the total effect, the natural direct effect, the total indirect effect, and the pre-trained biased coefficient.
[0011] Furthermore, determining the verification output result corresponding to the medical text based on the total effect, the natural direct effect, and the debiasing coefficient includes: performing debiasing processing on the natural direct effect based on the debiasing coefficient; and determining the verification output result corresponding to the medical text based on the total effect and the debiased natural direct effect.
[0012] Furthermore, the pre-training debiasing coefficients are determined through the following steps: obtaining training data and the labels corresponding to the training data; determining the training analysis results based on the training data and the preset debiasing coefficients; and adjusting the preset debiasing coefficients based on the difference between the training analysis results and the labels to determine the pre-training debiasing coefficients.
[0013] Secondly, this application provides a medical text processing device based on counterfactual causal reasoning. The device includes: a first path acquisition module, used to determine a first statement and a first piece of evidence based on the medical text, and to generate a first feature map to determine a first path based on the first statement and the first piece of evidence; a second path acquisition module, used to acquire a second statement and a second piece of evidence of counterfactual intervention, and to generate a second feature map to determine a second path based on the second statement and the second piece of evidence; an effect analysis processing module, used to determine the total effect, the natural direct effect, and the total indirect effect based on the first statement, the first piece of evidence, the first path, the second statement, the second piece of evidence, and the second path, so as to determine the biased coefficient; and an output result acquisition module, used to determine the verification output result corresponding to the medical text based on the total effect, the natural direct effect, and the biased coefficient.
[0014] Thirdly, this application provides a network device, including: a memory, a transceiver, and a processor; wherein the memory is used to store a computer program; the transceiver is used to send and receive data under the control of the processor; and the processor is used to read the computer program in the memory and execute the method as described in the first aspect.
[0015] Fourthly, this application provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.
[0016] The beneficial effects of the technical solution provided in this application are:
[0017] The proposed solution can be applied to medical text processing scenarios. It extracts statements and evidence from medical texts and combines them with counterfactual statements and evidence for comprehensive analysis to balance the weights of facts and counterfactuals, thereby improving the accuracy of the output results. Specifically, this solution identifies the first statement and first piece of evidence based on the medical text, and generates a first feature map based on these to determine the first path. It then obtains the second statement and second piece of evidence related to counterfactual intervention, and generates a second feature map based on these to determine the second path. Based on the first statement, first piece of evidence, first path, second statement, second piece of evidence, and second path, it determines the total effect, natural direct effect, and total indirect effect to determine the bias reduction coefficient. Finally, based on the total effect, natural direct effect, and bias reduction coefficient, it determines the corresponding verification output result for the medical text. While some solutions use bias reduction coefficients during the training phase to optimize the model, this solution not only uses bias reduction coefficients during training but also during the inference phase after model training to adjust the inference process, thereby improving the accuracy of the output results. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.
[0019] Figure 1 This is a schematic diagram of the counterfactual reasoning framework for multi-hop fact verification according to an embodiment of this application;
[0020] Figure 2 This is a flowchart illustrating a medical text processing method based on counterfactual causal reasoning according to an embodiment of this application.
[0021] Figure 3 This is a schematic diagram illustrating the steps of a medical text processing method based on counterfactual causal reasoning according to an embodiment of this application;
[0022] Figure 4 This is a schematic diagram of the structure of a medical text processing device based on counterfactual causal reasoning according to an embodiment of this application;
[0023] Figure 5 This is a structural block diagram of a network device according to an embodiment of this application;
[0024] Figure 6 This is a structural block diagram of a user equipment according to one embodiment of this application. Detailed Implementation
[0025] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals identify the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0026] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms, while “a plurality” refers to two or more, and other quantifiers are similarly understood. It should be further understood that the word “comprising” as used in this application’s specification means the presence of the stated feature, integer, step, operation, element, and / or component, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The word “and / or” as used herein describes the relationship between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character “ / ” generally indicates that the preceding and following related objects are in an “or” relationship.
[0027] The proposed solution can be applied to medical text processing scenarios. It extracts statements and evidence from medical texts and combines them with counterfactual statements and evidence for comprehensive analysis to balance the weights of facts and counterfactuals, thereby improving the accuracy of the output results for medical texts. While some solutions use bias removal coefficients to optimize the model during the training phase, this solution employs bias removal coefficients not only during training but also in the inference phase after model training to adjust the inference process, thus improving the accuracy of the output results.
[0028] The main purpose of this plan is:
[0029] 1. Fine separation of causal and semantic paths: For medical statements such as clinical diagnostic conclusions, treatment recommendations, or drug interactions, a statement-evidence causal graph is constructed to decompose the total causal effect (TE) into natural direct effects (NDE) and total indirect effects (TIE), enabling independent measurement and processing of bias signals and semantic information, and ensuring the accuracy and reliability of diagnostic or treatment decisions.
[0030] 2. Introduce a dynamically adjustable debiasing factor: Design a dynamic adjustment coefficient β based on instance-level medical text features (such as the frequency of disease terms, co-occurrence of drug names, and electronic medical record context). Combine causal path and semantic path information to adaptively adjust the debiasing intensity, maintain the best balance between eliminating bias and retaining key information, and prevent the loss of important clinical clues.
[0031] 3. Unified counterfactual operations in training and inference stages: Extend counterfactual intervention from the training stage to the online inference stage, calculate causal effects in real time and correct inference results to deal with the differences in the distribution of multi-source data and adversarial misinformation in medical texts, and improve the model's adaptability and robustness to dynamic scenarios.
[0032] With the aforementioned technical objectives, this solution aims to significantly improve the accuracy, robustness, and generalization of multi-hop fact-checking models in the medical field across various clinical trial reports, case records, guideline documents, and misinformation scenarios.
[0033] To achieve the above objectives, this proposal suggests a multi-hop fact verification dynamic debiasing method based on counterfactual causal reasoning. Its core comprises four main modules: claim and evidence feature extraction, causal effect decomposition, dynamic debiasing factor generation, and counterfactual reasoning correction. First, a pre-trained language model and a graph network are used to encode the claim and multiple candidate evidences, respectively, yielding claim features and evidence features. Then, a claim-evidence causal graph is constructed based on these two types of features. The total causal effect (TE) is calculated through multi-hop path sampling and fusion, and natural direct effects (NDEs) are extracted through counterfactual intervention within the same framework. Next, a dynamic factor generator is designed, taking sample-level features as input and automatically outputting a debiasing coefficient β ranging from (0, 1) to balance bias signals and semantic information. Finally, during the inference stage, TE, NDE, and β are combined, and the model prediction is adjusted in real-time using a counterfactual correction formula. This achieves both bias elimination and preservation of core semantics, while simultaneously outputting intermediate causal quantities to enhance interpretability. This method overcomes the limitations of static debiasing and the disconnect between training and inference, and achieves dynamic, interpretable and highly robust debiasing inference for multi-hop inference scenarios.
[0034] The following is a detailed explanation of this plan:
[0035] This solution designs a Counterfactual Reasoning for Multi-hop Fact Verification (CRFV) framework, aiming to complete multi-hop fact verification tasks by integrating statements (C) and multiple pieces of evidence (E). This framework generates a final verification result (R) reflecting both direct and indirect causal effects through the analysis of structured relationships and reasoning paths. Figure 1 This demonstrates the overall reasoning framework of C→R, E→R, and (C, E)→G→P→R. Figure 1The CRFV framework is illustrated as follows: C stands for Claim, E for Evidence (supporting, refuting, or insufficiently informed claims), G for the fully connected graph of claims and evidence, P for Path Reasoning (extracting the optimal reasoning path from G), and R for the final verification output (Result).
[0036] Defining causal paths and counterfactual expressions:
[0037] Causal path:
[0038] Direct Path C→R: This method derives the result directly from the statement without relying on evidence or reasoning paths, assessing the initial credibility of the statement.
[0039] Indirect Path (C, E) → G → P → R: By integrating the fully connected graph (G) of statements and evidence, the causal chain is extracted using the path reasoning module (P), and the deep impact of complex interactions on the results is analyzed.
[0040] Figure 2 Demonstrates the calculation process in real-world scenarios (such as...) Figure 2 a) Calculation process in counterfactual scenarios (e.g.) Figure 2 (b) and the process of removing bias from the inference results (e.g.) Figure 2 (c)
[0041] Figure 2 In section 'a', the calculation process for the factual scenario involving the values C = c and E = e is described.
[0042] Figure 2 In the middle b, the counterfactual scenario is located in the calculation process of values C = c*, E = e*, and P = p* = Pg* = P (G = g*);
[0043] Figure 2 The formula c describes the process of adjusting the biased prediction.
[0044] In counterfactual intervention scenarios, based on the counterfactual principle of causal reasoning, for a given C=c and E=e, in a factual scenario, Figure 2 (a) The result R is:
[0045] R c,e,p =R(C=c,E=e,P=p) Formula 1
[0046] Where P = p = Pg = P (G = g). g represents a fully connected graph with C = c and E = e.
[0047] This plan analyzes data from both factual and counterfactual scenarios to determine the total effect, direct natural effect, and total indirect effect.
[0048] Total Effect (TE): In fact-checking tasks, the total effect (TE) measures the overall causal impact on outcome R given C and E. It is calculated by comparing the outcome increment between the intervention scenario and the non-intervention scenario. (See Equation 2.)
[0049] TE=R c,e,p -R c*,e*,p* Formula 2
[0050] Where Rc,e,p and Rc*,e*,p* represent the results obtained in the factual scenario and the counterfactual intervention scenario, respectively.
[0051] Natural Direct Effect (NDE): To separate the direct impact of claims on the results, the model relies solely on the direct information of the claims for inference. As shown in Equation 3:
[0052] NDE=R c,e*,p* -R c*,e*,p* Formula 3
[0053] Total Indirect Effect (TIE): The total indirect effect reflects the mediating role of statements, evidence, and reasoning paths. It is calculated by subtracting the natural direct effect from the total effect, as shown in Formula 4:
[0054] TIE = TE - NDE = Rc,e,p - Rc,e*,p* (Formula 4)
[0055] The goal of this scheme is to control the natural direct effects of the direct path (C→R) to mitigate language bias. Therefore, this scheme obtains the debiased prediction results through counterfactual inference, as shown in Formula 5:
[0056] TE-βNDE=R c,e,p -R c*,e*,p* –β(R c,e*p* -R c*e*,p* )
[0057] =R c,e,p -β*R c,*,p* +(β-1)R c*,e*,p* Formula 5
[0058] Here, β is a hyperparameter that dynamically controls the weights of the NDE, and the role of β is to balance the actual scenario R. c,e,p and counterfactual scenario R c,e*,p* The contribution of this adjusts the impact of the deviation path.
[0059] The estimation of (β-1)Rc*,e*,p*: In this case, (β-1)Rc*,e*,p* is assumed to be constant because all variables are fixed at the reference state, and in Figure 2 In the counterfactual scenario, the causal effects of all paths remain constant. Specifically, this is because Rc*,e*,p* represent the path effects in the reference state, and their values are fixed throughout the prediction process, unaffected by the dynamic adjustments of other variables or hyperparameter β. Therefore, Rc*,e*,p* can be considered a constant. Thus, regardless of the value of (β-1), the contribution of (β-1)Rc*,e*,p* remains consistent, introducing no dynamic error or variation, and thus having no substantial effect on adjusting the prediction results. Based on these two points, the contribution of (β-1)Rc*,e*,p* can be ignored, as it has no impact on the final prediction and optimization objective. As shown in Equation 6:
[0060] TE-βNDE≈R c,e,p -β*R c,e*,p* Formula 6
[0061] The following describes the implementation process of the CRFV framework: Parameterization, where Rc, e, and p are the calculation results for the three-class classification. The three-class classification results are obtained through three models, ScC, ScE, and ScCE, and a fusion function h. The parameterization is shown in Formula 7 below:
[0062] R c =Kong C (c) R e =Kong E (e), R p =Kong CE (c,e)
[0063] R c,e,p =h(R) c ,R e ,R p ) Formula 7
[0064] Where C is the declaration-only branch (i.e., the direct path C→R), E is the evidence-only branch (i.e., E→R), and CE is the declaration and multiple evidence fusion reasoning branch (i.e., the indirect path (C, E)→G→P→R). The output is then processed by the fusion function h(.) to obtain the result Rc,e,p.
[0065] The following is the model implementation process, in detail:
[0066] C→Rc branch: The direct influence of the declaration C on the result R is represented by Rc: Rc = √(C(c)), where √(C(c)) represents the result representation extracted from the declaration feature c by BERT.
[0067] E→Re branch: The direct impact of evidence E on result R is represented by Re: Re = SqlE(e), where SqlE(e) represents the result representation extracted from evidence feature e by BERT.
[0068] (C, E)→G→P→Rp branch: The fusion reasoning process of statement C and multiple pieces of evidence E is completed through three-stage modeling, which are described in detail below.
[0069] The first stage (C, E) → G graph feature generation process is shown in Equations 8 and 9:
[0070]
[0071] Xlayer = GConv(X(c,e),A) Formula 9
[0072] Wherein, BERT(c) is the feature of the claim node, {BERT(ei)} is the feature set of multiple evidence nodes, n is the number of evidence; A is the adjacency matrix of the graph, layer represents the number of convolution layers of the graph, G represents the graph formed by the union of the claim and evidence feature sets, and Xlayer represents the graph node features after semantic and structural fusion.
[0073] The second-stage G→P path reasoning process is shown in Formula 10:
[0074]
[0075] Among them, P walk (p) represents the probability of walking path p, where x0 is the feature (i.e., the declared feature) of the starting node, x k and x k+1 L represents the features of nodes in the path (i.e., evidence features), |L| represents the path length, and MLP stands for Multilayer Perceptron.
[0076] The third-stage P→Rp path feature mapping process is shown in Equation 11:
[0077] R p =MLP(Flatten(P)) Formula 11
[0078] The Flatten operation is used to concatenate a multidimensional tensor P into a one-dimensional vector of length L*d in a fixed order.
[0079] The fusion result R of this scheme c,e,p It is R c R e and R p The combination of these, as shown in Formula 12:
[0080] R c,e,p =h(R) c ,Re ,R p )=logσ(R SUM ) Formula 12
[0081] Where R SUM =R c +R e +R p h(.) is the fusion function.
[0082] In summary, during the inference phase, this scheme constructs a claim-evidence causal graph to finely decompose the model's total causal effect (TE) into natural direct effects (NDE) and total indirect effects (TIE), achieving independent measurement of bias signals and semantic information. For each instance, this scheme designs a lightweight multilayer perceptron (MLP) dynamic debiasing factor generator, taking the joint features of claim, evidence, and multi-hop paths as input, and outputting a debiasing coefficient β with values ranging from (0, 1) in real time, adaptively balancing bias elimination and semantic preservation. Based on the claim-evidence fully connected graph, this scheme employs a random walk algorithm to extract multiple evidence links with controllable hop counts, and combines graph convolutional networks (GCN) and MLP to aggregate path node features, enriching the ability to capture indirect semantic information. In the counterfactual correction module, this scheme corrects the original prediction results in real time and simultaneously outputs intermediate causal quantities such as TE, NDE, TIE, and β, greatly enhancing the interpretability and robustness of the multi-hop fact-verification model.
[0083] This solution decomposes the total causal effect (TE) in real time during the inference phase and dynamically generates a bias removal factor β. It adaptively adjusts the bias removal strength based on different test distributions and adversarial examples, significantly improving the accuracy and robustness of multi-hop fact-verification models in heterogeneous scenarios. Furthermore, by decomposing the TE into natural direct effects (NDEs) and total indirect effects (TIEs) and simultaneously outputting intermediate causal quantities through a visualization interface, users can intuitively understand the sources of bias and semantic preservation effects without manually analyzing the model's decision path. This not only enhances the credibility of the verification results but also significantly reduces the cost of subsequent manual investigation and optimization.
[0084] The present invention has been experimentally verified on multiple public benchmarks such as FEVER, PolitiHop and its adversarial / symmetric variants. The results are shown in Table 1, which show that the CRFV method of the present invention improves the accuracy on average compared with the prior art and significantly enhances the robustness of the model in adversarial scenarios.
[0085]
[0086] Table 1
[0087] Table 1 shows the experimental results for the FEVER dataset and its variants, and the PolitiHop dataset and its variants.
[0088] Specifically, based on the above embodiments, this application provides a medical text processing method based on counterfactual causal reasoning, such as... Figure 3 As shown, the method includes:
[0089] Step 102: Determine the first statement and the first evidence based on the medical text, and generate a first feature map based on the first statement and the first evidence to determine the first path.
[0090] Step 104: Obtain a second statement and second evidence of counterfactual intervention, and based on the second statement and second evidence, generate a second feature map to determine the second path.
[0091] Step 106: Based on the first statement, the first evidence, the first path, the second statement, the second evidence, and the second path, determine the total effect, the natural direct effect, and the total indirect effect in order to determine the biased coefficient.
[0092] Step 108: Determine the validation output results corresponding to the medical text based on the total effect, natural direct effect, and debiasing coefficient.
[0093] The proposed solution can be applied to medical text processing scenarios. It extracts statements and evidence from medical texts and combines them with counterfactual statements and evidence for comprehensive analysis to balance the weights of facts and counterfactuals, thereby improving the accuracy of the output results. Specifically, this solution identifies the first statement and first piece of evidence based on the medical text, and generates a first feature map based on these to determine the first path. It then obtains the second statement and second piece of evidence related to counterfactual intervention, and generates a second feature map based on these to determine the second path. Based on the first statement, first piece of evidence, first path, second statement, second piece of evidence, and second path, it determines the total effect, natural direct effect, and total indirect effect to determine the bias reduction coefficient. Finally, based on the total effect, natural direct effect, and bias reduction coefficient, it determines the corresponding verification output result for the medical text. While some solutions use bias reduction coefficients during the training phase to optimize the model, this solution not only uses bias reduction coefficients during training but also during the inference phase after model training to adjust the inference process, thereby improving the accuracy of the output results.
[0094] This solution can utilize a reasoning framework to process data based on a first statement and first evidence, or a second statement and second evidence, to analyze and determine the walking path. Specifically, as an optional embodiment, generating a first feature map based on the first statement and first evidence to determine the first path includes: generating feature nodes based on the first statement and first evidence, and performing feature aggregation and convolution processing to obtain the first feature map; using the feature nodes corresponding to the first statement in the first feature map as starting points, analyzing the walking probability of each feature node to form the first path.
[0095] This solution pre-sets a reasoning framework (CRFV) to process data from factual and counterfactual scenarios to determine corresponding analysis results. This allows for further analysis of the total effect, decomposing it into natural direct effects and total indirect effects, and determining the bias reduction coefficients. Specifically, as an optional embodiment, determining the total effect, natural direct effect, and total indirect effect based on a first statement, first evidence, a first path, a second statement, second evidence, and a second path, and then determining the bias reduction coefficients, includes: inputting the first statement, first evidence, and first path into the reasoning framework to determine a first analysis result; inputting the second statement, second evidence, and second path into the reasoning framework to determine a second analysis result; inputting the first statement, second evidence, and second path into the reasoning framework to determine a third analysis result; and determining the total effect, natural direct effect, and total indirect effect based on the first, second, and third analysis results, thus determining the bias reduction coefficients. Specifically, as an optional embodiment, determining the total effect, natural direct effect, and total indirect effect based on the first analysis result, the second analysis result, and the third analysis result, in order to determine the biased coefficient, includes: determining the total effect based on the first analysis result and the second analysis result; determining the natural direct effect based on the second analysis result and the third analysis result; determining the total indirect effect based on the total effect and the natural direct effect; and determining the biased coefficient based on the total effect, the natural direct effect, the total indirect effect, and the pre-trained biased coefficient.
[0096] The reasoning framework of this scheme can employ the BERT model to extract features from claims and evidence, and determine corresponding intermediate results. It can also determine features corresponding to paths, thereby determining intermediate results. Multiple intermediate results are then fused to obtain the analysis result. Specifically, as an optional embodiment, the reasoning framework is used to determine the analysis result according to the following steps: extracting claim features based on the claim to determine a first intermediate result; extracting evidence features based on the evidence to determine a second intermediate result; fusing node features based on the paths corresponding to the feature maps to determine a third intermediate result; and performing a fusion analysis based on the first, second, and third intermediate results to determine the analysis result.
[0097] This scheme employs a bias-reduction coefficient to remove bias from natural direct effects during the training phase, and similarly uses a dynamic bias-reduction coefficient to influence the output results during the inference phase. This bias-reduction coefficient is adjusted based on the data generated during the inference phase, thus adapting to the data. Specifically, as an optional embodiment, determining the verification output result corresponding to the medical text based on the total effect, natural direct effects, and bias-reduction coefficient includes: removing bias from natural direct effects based on the bias-reduction coefficient; and determining the verification output result corresponding to the medical text based on the total effect and the bias-reduced natural direct effects. During the training phase, the bias-reduction coefficient can be generated based on training data and the corresponding labels. Specifically, as an optional embodiment, the pre-trained bias-reduction coefficient is determined through the following steps: obtaining training data and the corresponding labels; determining the training analysis result based on the training data and the preset bias-reduction coefficient; and adjusting the preset bias-reduction coefficient based on the difference between the training analysis result and the labels to determine the pre-trained bias-reduction coefficient.
[0098] Based on the above embodiments, this application also provides a medical text processing device based on counterfactual causal reasoning, such as... Figure 4 As shown, the device includes:
[0099] The first path acquisition module 202 is used to determine the first statement and the first evidence based on medical text, and to generate a first feature map based on the first statement and the first evidence to determine the first path.
[0100] The second path acquisition module 204 is used to acquire a second statement and second evidence of counterfactual intervention, and generate a second feature map based on the second statement and second evidence to determine the second path.
[0101] Effect analysis processing module 206 is used to determine the total effect, natural direct effect, and total indirect effect based on the first statement, first evidence, first path, second statement, second evidence, and second path, so as to determine the biased coefficient.
[0102] The output result acquisition module 208 is used to determine the verification output result corresponding to the medical text based on the total effect, natural direct effect and the debiased coefficient.
[0103] The implementation methods of this application are similar to those of the above embodiments. For specific implementation methods, please refer to the specific implementation methods of the above embodiments, which will not be repeated here.
[0104] The proposed solution can be applied to medical text processing scenarios. It extracts statements and evidence from medical texts and combines them with counterfactual statements and evidence for comprehensive analysis to balance the weights of facts and counterfactuals, thereby improving the accuracy of the output results. Specifically, this solution identifies the first statement and first piece of evidence based on the medical text, and generates a first feature map based on these to determine the first path. It then obtains the second statement and second piece of evidence related to counterfactual intervention, and generates a second feature map based on these to determine the second path. Based on the first statement, first piece of evidence, first path, second statement, second piece of evidence, and second path, it determines the total effect, natural direct effect, and total indirect effect to determine the bias reduction coefficient. Finally, based on the total effect, natural direct effect, and bias reduction coefficient, it determines the corresponding verification output result for the medical text. While some solutions use bias reduction coefficients during the training phase to optimize the model, this solution not only uses bias reduction coefficients during training but also during the inference phase after model training to adjust the inference process, thereby improving the accuracy of the output results.
[0105] It should be noted that the division of units and / or modules in the embodiments of this application is illustrative and only represents a logical functional division. In actual implementation, there may be other division methods. Furthermore, the functional units and / or modules in the various embodiments of this application can be integrated into one processing unit and / or module, or each unit and / or module can exist physically separately, or two or more units and / or modules can be integrated into one unit and / or module. The integrated units and / or modules described above can be implemented in hardware or as software functional units and / or modules.
[0106] If the integrated units and / or modules are implemented as software functional units and / or modules and sold or used as independent products, they can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to related technologies, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0107] Furthermore, the data transmission apparatus and data transmission method provided in the above embodiments are based on the same application concept. Since the methods and apparatus solve problems in similar principles, the implementation of the apparatus and methods can refer to each other, and repeated parts will not be described again.
[0108] Figure 5 A structural block diagram of a network device is shown according to an exemplary embodiment.
[0109] like Figure 5 As shown, the network device 1100 includes at least: a processor 1110, a memory 1120, and a transceiver 1130.
[0110] The transceiver 1130 is used to receive and send data under the control of the processor 1110.
[0111] exist Figure 5 In this context, the bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits of one or more processors represented by processor 1110 and memory represented by memory 1120 together. The bus architecture can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface. The transceiver 1130 can be multiple elements, including transmitters and receivers, providing units and / or modules for communicating with various other devices over transmission media, including wireless channels, wired channels, optical fibers, and other transmission media.
[0112] The processor 1110 is responsible for managing the bus architecture and general processing, and the memory 1120 can store the data used by the processor 1110 when performing operations.
[0113] Optionally, the processor 1110 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a complex programmable logic device (CPLD). The processor 1110 may also adopt a multi-core architecture. The processor 1110 and the memory 1120 may also be physically separated.
[0114] The processor 1110 calls the computer program stored in the memory 1120 to execute any of the cell wireless network temporary identifier allocation methods provided in the above embodiments of this application according to the obtained executable instructions.
[0115] Figure 6 A structural block diagram of a user equipment is shown according to an exemplary embodiment.
[0116] like Figure 6 As shown, the user equipment 1300 includes at least: a processor 1310, a memory 1320, and a transceiver 1330.
[0117] The transceiver 1330 is used to receive and send data under the control of the processor 1310.
[0118] exist Figure 6 In this context, the bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits of one or more processors represented by processor 1310 and memory represented by memory 1320 together. The bus architecture can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface. The transceiver 1330 can be multiple elements, including transmitters and receivers, providing units and / or modules for communicating with various other devices over a transmission medium, including wireless channels, wired channels, optical fibers, etc. For different user equipment, the user interface 1340 can also be an interface capable of connecting external or internal devices, including but not limited to keypads, displays, speakers, microphones, joysticks, etc.
[0119] The processor 1310 is responsible for managing the bus architecture and general processing, and the memory 1320 can store the data used by the processor 1310 when performing operations.
[0120] Optionally, the processor 1310 can be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or a CPLD (Complex Programmable Logic Device). The processor 1310 can also adopt a multi-core architecture. The processor 1310 and the memory 1320 can also be physically separated.
[0121] The processor 1310 calls the computer program stored in the memory 1320 to execute any of the cell wireless network temporary identifier allocation methods provided in the above embodiments of this application according to the obtained executable instructions.
[0122] It should be noted that the apparatus provided in this application embodiment can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.
[0123] Furthermore, this application provides a storage medium storing a computer program, which, when executed by a processor, implements the data transmission methods described in the above embodiments. The storage medium can be any available medium or data storage device accessible to the processor, including but not limited to magnetic storage (e.g., floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND flash), solid-state drives (SSDs)).
[0124] This application provides a program product, such as an FPGA chip or a DSP chip, which includes executable instructions stored in a storage medium. A processor reads the executable instructions from the storage medium, causing the processor to execute the executable instructions to implement the data transmission methods described in the above embodiments.
[0125] The proposed solution can be applied to medical text processing scenarios. It extracts statements and evidence from medical texts and combines them with counterfactual statements and evidence for comprehensive analysis to balance the weights of facts and counterfactuals, thereby improving the accuracy of the output results. Specifically, this solution identifies the first statement and first piece of evidence based on the medical text, and generates a first feature map based on these to determine the first path. It then obtains the second statement and second piece of evidence related to counterfactual intervention, and generates a second feature map based on these to determine the second path. Based on the first statement, first piece of evidence, first path, second statement, second piece of evidence, and second path, it determines the total effect, natural direct effect, and total indirect effect to determine the bias reduction coefficient. Finally, based on the total effect, natural direct effect, and bias reduction coefficient, it determines the corresponding verification output result for the medical text. While some solutions use bias reduction coefficients during the training phase to optimize the model, this solution not only uses bias reduction coefficients during training but also during the inference phase after model training to adjust the inference process, thereby improving the accuracy of the output results.
[0126] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0127] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-executable instructions. These computer-executable instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0128] These processor-executable instructions may also be stored in a processor-readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the processor-readable memory produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0129] These processors can execute instructions that can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable device for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0130] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0131] The above description is only a partial embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be included in the protection scope of this application.
Claims
1. A medical text processing method based on counterfactual causal reasoning, characterized in that, The method includes: The first statement and first evidence are determined based on the medical text, and a first feature map is generated based on the first statement and first evidence to determine the first path; Obtain a second statement and second evidence of counterfactual intervention, and based on the second statement and second evidence, generate a second feature map to determine a second path; Based on the first statement, the first piece of evidence, the first path, the second statement, the second piece of evidence, and the second path, determine the total effect, the natural direct effect, and the total indirect effect in order to determine the debiased coefficient; The validation output results corresponding to the medical text are determined based on the total effect, the natural direct effect, and the debiasing coefficient.
2. The method as described in claim 1, characterized in that, The step of generating a first feature map based on a first statement and first evidence to determine a first path includes: Based on the first statement and the first evidence, feature nodes are generated and feature aggregation and convolution are performed to obtain the first feature map; Starting from the feature node corresponding to the first declaration in the first feature map, the walking probability of each feature node is analyzed to form the first path.
3. The method as described in claim 1, characterized in that, The determination of the total effect, natural direct effect, and total indirect effect based on the first statement, first evidence, and first path, the second statement, second evidence, and second path, in order to determine the debiased coefficient, includes: Input the first statement, the first piece of evidence, and the first path into the reasoning framework to determine the first analytical result; Input the second statement, second evidence, and second path into the reasoning framework to determine the second analysis result; Input the first statement, the second piece of evidence, and the second path into the reasoning framework to determine the third analytical result; Based on the results of the first, second, and third analyses, the total effect, natural direct effect, and total indirect effect are determined in order to determine the biased coefficient.
4. The method as described in claim 3, characterized in that, The reasoning framework is used to determine the analysis results based on the following steps: Based on the statement, feature extraction is performed to determine the first intermediate result; Based on the evidence, extract evidence features to determine the second intermediate result; Based on the path corresponding to the feature map, the node features are fused to determine the third intermediate result; The analysis results are determined by fusion analysis based on the first, second, and third intermediate results.
5. The method as described in claim 3, characterized in that, Based on the results of the first, second, and third analyses, the total effect, the natural direct effect, and the total indirect effect are determined to determine the biased coefficient, including: The overall effect was determined based on the results of the first and second analyses. Based on the results of the second and third analyses, the direct natural effects were determined; Determine the total indirect effect based on the total effect and the natural direct effect; The biased coefficients are determined based on the total effect, natural direct effect, total indirect effect, and pre-training biased coefficients.
6. The method as described in claim 5, characterized in that, The determination of the validation output results corresponding to the medical text based on the total effect, natural direct effect, and debiasing coefficient includes: The natural direct effects are debiased based on the debiasing coefficient; Based on the total effect and the natural direct effect after bias correction, the validation output results corresponding to the medical text are determined.
7. The method as described in claim 5, characterized in that, The pre-training debiasing coefficients are determined through the following steps: Obtain the training data and the corresponding labels for the training data; The training analysis results are determined based on the training data and the preset bias reduction coefficients; Based on the difference between the training analysis results and the labels, the preset bias removal coefficients are adjusted to determine the bias removal coefficients for pre-training.
8. A medical text processing device based on counterfactual causal reasoning, characterized in that, The device includes: The first path acquisition module is used to determine the first statement and the first evidence based on medical text, and to generate a first feature map based on the first statement and the first evidence to determine the first path; The second path acquisition module is used to acquire the second statement and the second evidence of counterfactual intervention, and generate a second feature map based on the second statement and the second evidence to determine the second path; The effect analysis processing module is used to determine the total effect, natural direct effect, and total indirect effect based on the first statement, first evidence, first path, second statement, second evidence, and second path, so as to determine the biased coefficient. The output result acquisition module is used to determine the validation output result corresponding to the medical text based on the total effect, natural direct effect, and debiasing coefficient.
9. A network device, characterized in that, include: The system includes a memory, a transceiver, and a processor; wherein the memory is used to store computer programs; and the transceiver is used to send and receive data under the control of the processor. The processor is configured to read the computer program in the memory and execute the method as described in claims 1-7.
10. A storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the method as described in claims 1-7.