Causal reasoning for making personalized decision making
By using weighted transduced conformal prediction methods in causal reasoning, learning the density ratio of observation and intervention distributions, the confidence interval problem in the absence of strong negligibility assumptions in the prior art is solved, and the confidence interval provision in the presence of hidden confusion is achieved.
Patent Information
- Application Number
- CN202480003505.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-09
- Publication Date
- 2025-03-25
AI Technical Summary
The prior art is difficult to provide a confidence interval with a limited sample guarantee for causal reasoning without a strong negligibility assumption, especially in the presence of hidden confusion.
A method based on weighted transduction conformal prediction is proposed, which calculates the reweighting function by learning the density ratio of observation and intervention distributions, providing a confidence interval with coverage guaranteed.
This method does not require a strong negligibility assumption, can provide a confidence interval with coverage guaranteed in the presence of confusion, and perform well with fewer intervention data.
Smart Images

Figure CN119698620A_ABST
Abstract
Description
Technical Field
[0001] The disclosed example embodiments relate generally to machine learning, and more particularly to methods, apparatus, devices, and computer-readable storage media for causal reasoning for making personalized decisions. Background Art
[0002] In the growing field of machine learning for causal inference, a variety of practical problems can be solved. For example, estimating the heterogeneous causal effects of an intervention (e.g., a drug) on important outcomes (e.g., health states) for different individuals is a fundamental problem in various influential research fields including economics, healthcare, and education. This problem can be formulated as estimating individual treatment effects (ITE). By developing machine learning models, point estimates of ITE can be improved. Summary of the invention
[0003] In the first aspect of the present disclosure, a method for model training is provided. The method includes: generating a first regression model based on at least a first observation data set associated with a first process, the first observation data set includes a plurality of observation samples, the observation samples include observation feature information of the observation object and the observation result of the observation object, and the first process is assigned to the object in the first observation data set based on the observation feature information; determining the corresponding consistency scores of the plurality of observation samples based on the difference between the prediction result and the observation result in the first observation data set, and the prediction result is determined by the first regression model based on the observation feature information of the observation object; determining the corresponding weights for the plurality of observation samples based on at least a first intervention data set associated with the first process, the first intervention data set includes a plurality of intervention samples, the intervention samples include intervention feature information of the intervention object and the intervention result of the intervention object, and the first process is randomly assigned to the intervention object in the first intervention data set; generating an empirical distribution of the corresponding consistency scores based on at least the corresponding consistency scores and the corresponding weights for the plurality of observation samples; and determining, for the test object, based on the empirical distribution and the test feature information of the test object, a first confidence interval of the predicted result of the test object when the first process is assigned.
[0004] In a second aspect of the present disclosure, a device for model training is provided. The device includes: a model generation module, configured to generate a first regression model based on at least a first observation data set associated with a first process, the first observation data set including a plurality of observation samples, the observation samples including observation feature information of an observation object and an observation result of the observation object, and the first process is assigned to an object in the first observation data set based on the observation feature information; a consistency determination module, configured to determine corresponding consistency scores of the plurality of observation samples based on a difference between a prediction result and an observation result in the first observation data set, the prediction result is determined by the first regression model based on the observation feature information of the observation object; a weight determination module, configured to determine corresponding weights for the plurality of observation samples based on at least a first intervention data set associated with the first process, the first intervention data set including a plurality of intervention samples, the intervention samples including intervention feature information of an intervention object and an intervention result of the intervention object, and the first process is randomly assigned to an intervention object in the first intervention data set; a distribution generation module, configured to generate an empirical distribution of corresponding consistency scores based on at least corresponding consistency scores and corresponding weights for the plurality of observation samples; and a confidence determination module, configured to determine, for a test object, a first confidence interval of a prediction result of a test object when the test object is assigned the first process based on the empirical distribution and the test feature information of the test object.
[0005] In a third aspect of the present disclosure, an electronic device is provided. The device includes: at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions executable by the at least one processing unit. When the instructions are executed by the at least one processing unit, the device executes the method of the first aspect.
[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method of the first aspect is implemented.
[0007] It should be understood that the contents described in the inventive content section of the present disclosure are neither intended to identify the key features or essential features of the embodiments of the present disclosure, nor intended to limit the scope of the present disclosure. Other features of the present disclosure will be easily conceivable through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals refer to the same or similar elements, wherein:
[0009] Figure 1 A schematic diagram illustrating an example environment in which embodiments of the present disclosure may be implemented;
[0010] Figure 2 An example causal graph with hidden obfuscation is shown;
[0011] Figure 3 A schematic diagram of a causal reasoning system according to some embodiments of the present disclosure is shown;
[0012] Figure 4 A flowchart showing a process for causal reasoning for making personalized decisions according to some embodiments of the present disclosure is shown;
[0013] Figure 5 A block diagram showing an apparatus for causal reasoning for making personalized decisions according to some embodiments of the present disclosure; and
[0014] Figure 6 A block diagram of an electronic device is shown in which one or more embodiments of the present disclosure may be implemented. DETAILED DESCRIPTION
[0015] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for illustrative purposes and are not intended to limit the scope of protection of the present disclosure.
[0016] In the description of the embodiments of the present disclosure, the term "including" and similar terms will be understood as open inclusion, i.e., "including but not limited to". The term "based on" will be understood as "based at least in part on". The term "one embodiment" or "the embodiment" will be understood as "at least one embodiment". The term "some embodiments" will be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below. As used herein, the term "model" may represent the degree of matching between various data. For example, the above-mentioned degree of matching may be obtained based on various technical solutions currently available and / or developed in the future.
[0017] It should be understood that the data involved in this technical solution (including but not limited to the data itself, data collection or use) should comply with the requirements of relevant laws, regulations and relevant provisions.
[0018] It is understandable that before using the technical solutions disclosed in the embodiments of the present invention, the type, scope of use, usage scenarios, etc. of the personal information involved in the present invention should be notified to the user in an appropriate manner in accordance with relevant laws and regulations, and the user's authorization should be obtained.
[0019] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested by the user requires obtaining and using the user's personal information. Therefore, the user can choose whether to provide personal information to software or hardware such as an electronic device, application, server or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0020] As an optional but non-limiting implementation, in response to receiving an active request from the user, the method of sending the prompt information to the user may be, for example, a pop-up window presenting the prompt information in text form. In addition, the pop-up window may also include a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0021] It is understandable that the above notification and user authorization process is merely illustrative and does not limit the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0022] As used herein, the term "model" can learn the correlation between the corresponding input and the output from the training data, so that the corresponding output can be generated for a given input after the training is completed. The generation of the model can be based on machine learning techniques. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs by using multiple layers of processing units. A neural network model is an example of a model based on deep learning. As used herein, a "model" may also be referred to as a "machine learning model", "learning model", "machine learning network" or "learning network", and these terms are used interchangeably herein.
[0023] A "neural network" is a machine learning network based on deep learning. A neural network is capable of processing an input and providing a corresponding output, and typically includes an input and output layer and one or more hidden layers between the input and output layers. Neural networks used in deep learning applications typically include many hidden layers, thereby increasing the depth of the network. The layers of a neural network are connected sequentially so that the output of a previous layer is provided as input to a subsequent layer, where the input layer receives the input of the neural network and the output of the output layer serves as the final output of the neural network. Each layer of a neural network includes one or more nodes (also called processing nodes or neurons), each of which processes the input from the previous layer.
[0024] Generally, machine learning can be roughly divided into three stages, namely the training stage, the testing stage, and the application stage (also called the inference stage). During the training stage, a given model can be trained using large-scale training data, and the parameter values can be iteratively updated until the model can obtain consistent inferences from the training data that meet the expected goals. Through training, the model can be considered to learn the correlation between input and output from the training data (also called input-to-output mapping). Determine the parameter values of the training model. In the testing stage, the test input is applied to the trained model to test whether the model can provide the correct output, thereby determining the performance of the model. In the application stage, the model can be used to process actual inputs and determine the corresponding outputs based on the parameter values obtained through training.
[0025] Figure 1 A block diagram of an example environment 100 is shown in which various embodiments of the present disclosure may be implemented. Figure 1 In the environment 100 of FIG. 1 , a computer system 110 applies a causal reasoning model 105 to perform causal reasoning. The causal reasoning model 105 is configured to process feature information 112 of the object in question to generate a prediction result 114 of the object when the processing is assigned to the object.
[0026] The feature information input to the causal reasoning model 105, the related processing, and the prediction results output from the causal reasoning model 105 can be designed according to the task to be performed.
[0027] In the example of causal inference for individual treatment effects (ITE) in healthcare, the feature information can include information related to a subject, the relevant treatment can include applying an intervention (e.g., a medication) to the subject or not applying the intervention to the subject, and the predicted outcome is related to the health state of the subject when the intervention is applied or not (e.g., expressed as a range of scores).
[0028] In an example of causal inference for real-world recommendations, feature information may include information related to a user-item pair, related processing may include whether the item is recommended to the user, and the predicted result is defined as the user's rating result (e.g., within a range of rating results).
[0029] In addition to ITE and recommendation scenarios, there may be various other scenarios where the effects of different treatments are evaluated for individuals. The estimation of individual treatment effects has been key in economics, healthcare, education, etc. for making individual decisions.
[0030] exist Figure 1In the present invention, the computer system 110 may include any computing system with computing capabilities, such as various computing devices / systems, terminal devices, servers, etc. The terminal device may include any type of mobile terminal, fixed terminal or portable terminal, including a mobile phone, a desktop computer, a laptop computer, a netbook, a tablet computer, a media computer, a multimedia tablet computer, or any combination thereof, including accessories and peripheral devices of these devices or any combination thereof. Servers include, but are not limited to, mainframes, edge computing nodes, computing devices in a cloud environment, etc.
[0031] It should be understood that the structure and function of each element in the environment 100 are described for illustrative purposes only and does not imply any limitation on the scope of the present disclosure.
[0032] As mentioned above, in the growing field of machine learning for causal inference, estimating heterogeneous causal effects of interventions has been framed as estimating ITE, and most existing work focuses on developing machine learning models to improve point estimates of ITE. However, point estimates are insufficient to ensure safe and reliable decision making in high-risk applications where the cost of failure is high or human life may be endangered, and therefore uncertainty quantification and confidence intervals allow machine learning models to express confidence in the correctness of their predictions.
[0033] Pioneering work provides confidence intervals for ITE through Bayesian machine learning models such as Bayesian Additive Regression Trees and Gaussian Processes. It is well known that these methods have asymptotic coverage guarantees (i.e., they require an infinite number of samples) and depend on the specific choice of regression model. Therefore, these methods cannot be easily generalized to popular machine learning models for causal reasoning on various input data types (including but not limited to text and graphs).
[0034] Recently, building on conformal prediction, conformal prediction methods for counterfactual outcomes and ITE have been proposed, which can provide confidence intervals with guaranteed marginal coverage in a model-agnostic manner. This means that, given any machine learning model that estimates potential outcomes in a treatment, conformal prediction acts as a post-organizational wrapper that provides confidence intervals that are guaranteed to contain the true values of potential outcomes and ITE above a specified probability under a marginal distribution. Unfortunately, however, it requires a strong assumption of ignorability, which excludes the possibility of hidden confounders that cannot be verified given the data and may be violated in many real-world applications. For example, the socioeconomic status of patients (which may not be available due to privacy issues) is a common unobserved confounder that affects patients' access to treatment and the health status of people. Similarly, under the strong ignorability assumption, it is proposed to use meta-learners in conformal prediction of ITE. Recently, hidden confounding has been considered for conformal prediction of ITE from the perspective of sensitivity analysis. However, their methods require access to upper and lower bounds on the density ratio between the observed distribution and the intervention distribution to characterize the covariate shift from the observed distribution to the intervention distribution.
[0035] To facilitate understanding, the following describes the problem setting and provides necessary background on conformal prediction.
[0036] A standard potential outcome (PO) framework with binary treatment (recommended) is considered. Assume T∈{0,1} is the treatment indicator, is the observed characteristic information (e.g., observed covariates), and is the observation of interest. For each object i, assume that (Y i (0),Y i (1)) is a potential pair of outcomes under the control of treatment T = 0 and treatment T = 1, respectively. Assume that the data generating process satisfies the following widely used assumptions: -Consistency: Y i =Y i (T i ), which means that the observation Y i With the observation processing T i Potential outcome of situation Y i (T i )same. -Positiveness: This means that any object has a positive probability to be treated and controlled.
[0037] Note that strong ignorability is not assumed in the standard PO framework. That is, there may be potential hidden confounds U that affect both the process T and the outcome Y. Figure 2An example causal graph with hidden confounding is shown, where X represents observed covariates, U represents hidden confounding, T represents observed treatment, and Y represents outcome. Directed edges represent causal relationships, and bidirectional edges represent possible correlations. It can be seen that if there are some hidden confoundings other than observed covariates that may affect treatment and outcome, then causal inference modeling of observed covariates may not lead to accurate treatment and outcome.
[0038] In this framework, the joint distribution under intervention do(T=t) is P X,Y(t) =P Y(t)|X ×P X , and the joint distribution of the observed data is P X,Y|T=t =P Y|X,T=t ×P X|T=t Note that the conditional distribution P Y(t)|X and P Y|X,T=t The difference between is due to potential hidden confounds and the conditional distribution P X and P X|T=t The difference between is due to the intervention. Throughout this work, the notation of probability density (mass) functions is used instead of probability measures. Superscript I is used for intervention distributions, and O is used for observation distributions. For a given treatment t∈{0,1}, assume there are n observation samples and m intervention samples:
[0039] Given a predetermined target coverage of 1-α, the goal is to n+m+1 ~p(x) constructs a confidence interval C for the potential outcome under treatment t, so that C(x n+m+1 ) Ensure marginal coverage: The probability is
[0040] Conformal prediction (CP) is a distribution-free framework that provides marginal coverage guarantees for finite samples. Transductive and segmented CP are two methods for conformal prediction, and both are briefly introduced as they will be used below.
[0041] Given a dataset Segmentation Conformal Prediction (SCP) starts by passing Split into two disjoint subsets: training set and calibration set Then, in Train a regression estimator on And for To calculate the consistency score s(x, y), where usually The empirical distribution of consistency scores is defined as And for the target sample x n+1 The confidence interval for is: in It has been proven that in Under the exchangeability of n+1 ) is guaranteed to satisfy marginal coverage. Furthermore, if the connection between the consistency scores occurs with probability zero, then:
[0042] Note that the upper bound ensures that the confidence interval is non-empty, i.e., the interval width does not go to infinity.
[0043] Given the same dataset as above Through the loop domain All possible values of Transductive Conformal Prediction (TCP) takes a different approach. TCP first builds an enhanced dataset Then, in and for i=1,…,n and of Above, the regression estimator Utilization is defined as The empirical distribution of the target sample x n+1 The interval is: in The same lower and upper bound guarantees as in Eq. (4) have been proven.
[0044] TCP is computationally more expensive because it requires a Fitting The discretization of is a trade-off between computational cost and accuracy of the conformal interval. For these reasons, SCP is more widely used due to its simplicity, however, by splitting the dataset into training and calibration sets, SCP is less sample efficient. Cross-conformal prediction can be used to improve the efficiency of SCP.
[0045] When the calibration data and the test data are independent but not drawn from the same distribution, a weighted version of conformal prediction is proposed. In this paper, we discuss a more specific setting where datasets from two different distributions are merged. And the test sample x n+m+1 From P′ X The density ratio dP is defined as Then in the weight function w(x, y) = 1 if(x, y)~P X,Y and w(x,y)=r(x,y)if(x,y)~P′ X,Y In the case of are weighted exchanges. Normalize the weight p i Defined as: where the sum is performed over the permutations σ of 1, ..., n+m+1. Here, in equation (6), the usual notation is used for symmetry reasons: Utilizes a consistency score calculated in the same way as TCP and is defined as The weighted empirical distribution of the consistency score of , with a conformal interval for the target sample is: in Under additional assumptions, the lower bound guarantee and upper bound are proved. When m = 0, p i becomes This is more commonly used in the literature. When m>1, p i The computational cost is
[0046] To address the above limitations and provide confidence intervals with finite sample guarantees even without strong ignorability assumptions, embodiments of the present disclosure propose an improved solution, referred to as weighted transductive conformal prediction with density ratio estimation (w TCP-DR) based on weighted transductive conformal prediction. Under less restrictive assumptions, the solution requires access to observations and a portion of intervention data (e.g., data collected from randomized controlled trials). In contrast to weighted conformal prediction methods that use propensity scores as reweighting functions, the solution computes the reweighting function by learning the density ratio of intervention and observation distributions using the provided data.
[0047] The proposed solution has benefits. First, it does not require strong ignorability assumptions and provides confidence intervals with coverage guarantees even in the presence of confounding. Second, it works well with an imbalanced number of intervention and observation data, i.e., when the intervention data are of smaller size than the observation data due to the higher cost of collecting the intervention data.
[0048]
[0046] Example embodiments of the present disclosure are described below, which provide confidence intervals for counterfactual outcomes at the individual level with marginal coverage guarantees.
[0049] Figure 3FIG. 3 is a schematic diagram of a causal reasoning system 300 according to some embodiments of the present disclosure. The causal reasoning system 300 may be implemented in Figure 1 The computer system 110 is used to implement causal reasoning.
[0050] According to an embodiment of the present disclosure, both observed data and intervention data are considered for conformal prediction with density ratio in the presence of restrictive assumptions of hidden confounding.
[0051] Different treatments (e.g., T=0 and T=1) are considered separately for causal inference. Figure 3 In the embodiment of the present invention, the observed data set 310-1 and the intervention data set 320-1 associated with the first process are used for causal reasoning associated with the first process. As will be described below, based on the observed data set 310-1 (and possibly based on the intervention data set 320-1), the regression model 305-1 is generated. In addition, the observed data set 310-2 and the intervention data set 320-2 associated with the second process are used for causal reasoning associated with the second process. As will be described below, based on the observed data set 310-2 (and possibly based on the intervention data set 320-2), the regression model 305-2 is generated.
[0052] The observation data set 310-1 includes a plurality of observation samples, the observation samples include observation feature information of the observation object and the observation result of the observation object, and the first process is assigned to the object in the first observation data set based on the observation feature information. The intervention data set 320-1 includes a plurality of intervention samples, the intervention samples include intervention feature information of the intervention object and the intervention result of the intervention object, and the first process is randomly assigned to the intervention object in the first intervention data set. Similarly, the observation data set 310-2 includes a plurality of observation samples, the observation samples include observation feature information of the observation object and the observation result of the observation object, and the second process is assigned to the object in the second observation data set based on the observation feature information. The intervention data set 310-2 includes a plurality of intervention samples, the intervention samples include intervention feature information of the intervention object and the intervention result of the intervention object, and the second process is randomly assigned to the intervention object in the second intervention data set.
[0053] In an example, a first treatment (e.g., T=1) may indicate that a medical intervention (e.g., a drug) is applied to the subject, and a second treatment (e.g., T=0) may indicate that a medical intervention (e.g., a drug) is not applied to the subject (or vice versa). In this case, the observation samples in the observation dataset 310-1 or the observation dataset 310-2 may be collected from subjects diagnosed as needing a drug or not needing a drug based on symptoms and other information related to the subject. The intervention samples in the intervention dataset 310-1 or the intervention dataset 310-2 may be collected from subjects in a medical clinical trial.
[0054] In an example, a first process (e.g., T=1) may indicate that a specific item is recommended to a user, and a second process (e.g., T=0) may indicate that a specific item is not applied to a user. In this case, the observation samples in the observation dataset 310-1 or the observation dataset 310-2 may be collected from users with or without items recommended by an existing recommendation strategy (which may be constructed by considering various information related to the user and the item). The intervention samples in the intervention dataset 310-1 or the intervention dataset 310-2 may be collected from users who are randomly recommended or not recommended with items in an A / B test for item recommendation.
[0055] During causal inference, a test sample (e.g., test feature information 302 of a test object) is input into either or both of regression model 305-1 and regression model 305-2 to determine a confidence interval 330-1 of a predicted result for the test object when assigned the first treatment and / or a confidence interval 330-2 of a predicted result for the test object when assigned the second treatment.
[0056] Hereinafter, for the purpose of discussion, the observation dataset 310-1 and the observation dataset 310-2 are collectively or individually referred to as the observation dataset 310; the intervention dataset 320-1 and the intervention dataset 320-2 are collectively or individually referred to as the intervention dataset 320; the regression model 305-1 and the regression model 305-2 are collectively or individually referred to as the regression model 305; and the confidence interval 330-1 and the confidence interval 330-2 are collectively or individually referred to as the confidence interval 330.
[0057] Since different treatments (e.g., T = 0 and T = 1) are considered separately, T = t is fixed, and for simplicity of notation, the dependence on T in equation (1) is discarded. Consider that there are n observed samples and m intervention samples, and the test sample is x n+m+1 The distributions of observed samples, intervention samples, and test samples are expressed as follows:
[0058] First, we introduce the direct method (naive method). This method includes: From the test sample When the distribution is the same, the standard segmentation conformal prediction using equation (3) is used, and only the intervention data Construct confidence intervals for potential outcomes.
[0059] The algorithm is described in detail in Algorithm 1 (as shown in Table 1). From equation (4), we can see that:
[0060] This approach can be inefficient because it completely ignores the n observations in the observed data, and typically n is greater than m. Table 1
[0061] In embodiments of the present disclosure, it is contemplated to combine both intervention data and observation data. In this case, it is necessary to consider the distribution shift. Therefore, the weighted conformal prediction of equation (7) is naturally applicable to such a task, and the key challenge is to identify the normalized weights in equation (6), that is, to identify the density ratio as:
[0062] However, still assuming that p I (y|x, t) is equal to p O (y|x, t), so r(x, y) is as simple as estimating the propensity score p(x) / p(x|t). When there is hidden confounding, the propensity score is not sufficient to account for distributional shift. As detailed next, we propose to learn the density ratio r(x, y) from the data.
[0063] The key to weighted conformal prediction is the density ratio r(x, y), and unfortunately there is a rich literature on density ratio estimation, including moment matching, probabilistic classification, and ratio matching. Since probabilistic classification using neural networks is more flexible and better exploits nonlinear relationships in the data, this paper only introduces probabilistic classification.
[0064] By assigning label z=1 to the observed sample And assign label z=0 to the intervention sample A new dataset is constructed for learning density ratios as follows.
[0065] For any nonlinear binary classification algorithm such as logistic regression with nonlinear features, the output class membership is and For a random forest or neural network, the estimated probability density ratio can be approximated by:
[0066] because is a constant and will be canceled out when calculating the normalized weights in equation (6), is expressed as the estimated density ratio, so the corresponding estimated normalized weight of equation (6) is:
[0067] Since equation (13) requires evaluating the density ratio of time, which is computationally impractical for m>1, so in some embodiments, only the observed data is used when calculating the normalized weights (i.e., m=1), and the intervention data is used to calculate the density ratio Therefore, the estimated normalized weights become: For i={1,…,n}∪{n+m+1}.
[0068] Through the above analysis of combining intervention data and observation data to calculate weights, conformal causal reasoning according to an embodiment of the present disclosure can be described as follows.
[0069] The process involves analyzing the observed data set 310 associated with a particular treatment (T=t, with t=0 or 1) To generate a regression model 305 The observed samples Contains the observation feature information of the observation object i and the observation results of the observation object with T = t Regression Model It can represent the distribution of results and the observed characteristic information of the object.
[0070] Then the observation data set 310 The observed characteristic information of the observed object is input into the regression model 305 to obtain the prediction result determined by the regression model 305 Based on the differences between the prediction results determined by the regression model 305 and the observations in the observation dataset 310, the corresponding consistency scores of the multiple observation samples are expressed as
[0071] Furthermore, based on at least one intervention data set 320 associated with a particular treatment T=t To calculate the corresponding weights of multiple observation samples The intervention sample Includes intervention characteristic information of intervention object i and the intervention results of the intervention subjects who applied treatment T = t The weights can be calculated according to equation (14) above. Calculated as the normalized weight. Various ways of determining the normalized weight are described below.
[0072] Then, based on at least the corresponding consistency scores and corresponding weights of multiple observation samples Empirical distribution of corresponding consistency scores Determine the empirical distribution corresponding to the predetermined probability through the quantile function Percentile value of The probability can be determined by the level α and calculated as (1-α). For example, α can be set to 10%, and the predetermined probability of the quantile value is 90%. Of course, the predetermined probability can be set to any suitable value from 0 to 100% as needed.
[0073] For the test sample (n+m+1), the test feature information of the test object is input into the regression model Get the prediction results of the test object specified for specific processing Then, based on the quantile value of the test object and predictive results to determine test subjects The confidence interval of the prediction result of . The confidence interval indicates the The marginal coverage of the prediction results is guaranteed.
[0074] In some embodiments, to allow identification of confidence intervals, a full weighted transductive conformal prediction with density ratio estimation is proposed.
[0075] Based on the intervention data set 310 associated with a specific treatment and observation dataset 320 The corresponding density ratio of n observation samples And the test density ratio of the test sample where i = n + m + 1. The density ratio can be estimated as described above.
[0076] Confidence Range is divided into multiple confidence units, For example, if the confidence interval If it is from 0 to 1, the confidence unit can be constructed as {0, 0.1}, {0.1, 0.2}, {0.2, 0.3}, ..., {0.9, 1.0}. The specific value of the confidence unit can depend on the confidence range, and the granularity of the confidence unit division can be configured as needed.
[0077] For each confidence unit in the plurality of confidence units, Iteratively do the following: -Build an enhanced dataset Including observational datasets and additional test samples consisting of test feature information and confidence units -Based on enhanced dataset Generating a Regression Model 305 - Calculate for i=1, ..., n and Consistency score as well as - Determine the corresponding weights of multiple observation samples as in equation (14) and the weights of the test samples (where Instead of y n+m+1 ); - A weighted empirical distribution of consistency scores generated based on weighting the corresponding consistency scores with the corresponding weights as well as - Determine the probability corresponding to a predetermined The quantiles of the empirical distribution of are as follows.
[0078] Through the above iterative process, multiple confidence units can be obtained Then, for each of the multiple first regression models, based on the regression model Determined prediction output and confidence units used to generate regression models The difference between the two determines the test consistency score of the test sample If the test consistency score is lower than or equal to the quantile value of the regression model, that is, The current confidence unit is combined as part of the confidence interval for the test object. The confidence interval is expressed as in is initialized to the empty set.
[0079] Through the above, by traversing multiple confidence units, Appropriate confidence units are combined to form confidence intervals for the test sample.
[0080] The complete description of the above iterative process is summarized as Algorithm 2, as shown in Table 2 below. Table 2
[0081] By using the estimated normalized weights Instead of the ideal normalized weight p i to reweight the empirical distribution of consistency scores The disclosed method introduces additional sources of error, as quantified below.
[0082] Proposition 1. In p O (x, y) and p I (x, y) are absolutely continuous with each other and Under the assumption that, then the confidence interval C constructed from Algorithm 2 wTCP-DR satisfy: where c is a constant, and is the approximate error of the density ratio.
[0083] By comparing equation (15) with equation (9), it can be seen that when the ideal density ratio r(x, y) is reached, Δ r = 0, then the disclosed method obtains a tighter upper bound than the naive method, because usually in causal inference the number of observations n is much larger than the number of interventions m, due to the higher cost of randomized controlled trajectories. Unfortunately, the ideal density ratio r(x, y) is usually not available, and the estimation error of the density ratio is of the order min(n, m) for moment matching or ratio matching. -1 / 2 =m -1 / 2 and the order m for probabilistic classification -1 / 2 It appears that the disclosed solution (denoted as wTCP-DR) expended a great deal of effort and ultimately achieved poor results.
[0084] However, the efficiency of the conformal prediction method is quantified by the width of the confidence interval rather than by the difference between the upper and lower probability bounds. An upper bound strictly below 1 guarantees that the confidence interval is not arbitrarily large, but there is no guarantee that a smaller upper bound results in a smaller confidence interval. Intuitively, this method has a smaller interval than the naive method because the regression model of the disclosed scheme is is trained on n observations, while the regression model of the naive method is trained on m intervention data. Intuitively, the consistency score of wTCP-DR is more likely to be smaller than that of the naive method, which means that the confidence interval C calculated by Algorithm 2 is wTCP-DR is C calculated by Algorithm 1 naive The above perception in the following section is formalized for the additive Gaussian noise model.
[0085] Consider the additive Gaussian noise model, which is a simple but popular setting in causal inference. Consider T = t to be fixed, and for simplicity of notation, discard the dependence on T. Specifically, make the following assumptions: -A1 Additive Gaussian noise. and in Represent the (learned) features of the intervention and observation data; -A2 Gaussian features. and -A3 is the ideal density ratio r(x, y) and the estimated density ratio An upper bound on the difference between: A4 border x2 In p I (x, y) and p O Divergence between (x, y):
[0086] Under these assumptions, by θ O and θ I The difference in hidden confounding effects from p O (y|x,t),p I The difference in (y|x, t) is reflected in: θ O depends on the hidden impurity u, while θ I Since the intervention does not depend on u. Before presenting our main theoretical results, we can first discuss the implications of these assumptions: -A1 Assume that the intervention data and observation data share the same characteristics A commonly used setting in causal inference, especially when learning with neural networks For simplicity, we assume that the observed and intervention data have the same noise scale, which can be relaxed to the more general case with different noise scales: O and I With different noise scales σ O , σ I ; -A2 This assumption is satisfied when the features are designed to have a Gaussian distribution or the features are learned from a sufficiently wide neural network; - A3 This assumption requires that the error of the density ratio estimate is upper bounded, and given that α is typically 0.1 or 0.05, this assumption is often satisfied in practice; and -A4 This assumption ensures that p I and p O exist share the same support, and are required so that the Central Limit Theorem can be used in the proof.
[0087] The main theoretical results of this disclosure are given below.
[0088] Theorem 1. Assuming that the above assumptions have at least probability 1-δ1-δ2-δ3-δ4, the interval obtained from Algorithm 2 will be smaller than the interval obtained from Algorithm 1 until δ1, δ2, δ3, δ4 are as follows: in Represents θ I and θ O The dissimilarity distance between -1 is the inverse error function, L1-α and C α is a constant that depends only on α; and n eff is the effective sample size defined as follows:
[0089] The meaning of Theorem 1 can be summarized as follows. -(1)δ1 quantifies the number of observations needed to contain sufficient information about the intervention distribution. If θ I and θ O Very close, which means that the distribution p I (x, y) and p O (x, y) is very similar, the exponential The larger , the smaller the number of observations (smaller n) will contain sufficient information about the intervention distribution. - (2) δ2 quantifies the stability of the used estimator. Since a least squares estimator is used which is known to be stable when n>d and m>d, having more n will require a smaller δ2. -(3)δ3 and δ4 quantify the effective sample size n eff The ratio of the intervention sample size m. n was first defined in the covariate shift literature. eff , and gives that the performance of weighted conformal prediction should depend on n eff The theorem first quantitatively shows that when compared with the standard conformal prediction, n eff is the key to measuring the performance of weighted conformal prediction, not n.
[0090] From Theorem 1, it can be seen that the confidence interval width provided is good when the intervention distribution is close to the observed distribution, when the size d is relatively high compared to the number of intervention samples m, and when the effective sample size n eff When m is greater than m, the method in Algorithm 2 proposed in this disclosure is more efficient than the method in Algorithm 1.
[0091] The following embodiment will present a more implementable variant of wTCP-DR in Algorithm 2.
[0092] In practice, although the transductive conformal prediction in Algorithm 2 is theoretically well implemented, it is computationally very expensive compared to the segmentation conformal prediction. The reason why the segmentation conformal prediction cannot be used in Algorithm 2 is that the density ratio is evaluated at the test sample, which requires knowing the test covariate x n+m+1 and the test target value y n+m+1 , but unfortunately, n+m+1 In some embodiments of the present disclosure, a two-stage segmentation conformal prediction is proposed, which is more efficient than the transductive conformal prediction algorithm 2 in computation and can achieve the same margin coverage guarantee.
[0093] In the first phase, due to the intervention label (The intervention result of the intervention sample) is achievable, and the density ratio in equation (6) for n+1, ..., n+m can be calculated and normalized conformal weights. Therefore, the segmentation weighted conformal prediction can be used to construct intervention samples with marginal coverage guarantees. The confidence interval of In the second stage, by noting the test sample With intervention sample Sharing the same distribution, standard segmentation conformal prediction can be used to construct test samples x with marginal coverage guarantees n+m+1 The confidence interval of
[0094] The details of this process are described below.
[0095] In the first stage, for multiple intervention samples For each intervention sample in , iteratively perform the following operations: -exist Generate regression model Or in some embodiments, using Regression model on The same regression model generated by - Determine the observation sample The consistency score, - Determine the weights for the intervention sample and for the observation sample as in equation (14) The corresponding weight of - Construct a weighted empirical distribution of consistency scores based on determined weights -Determine the quantile of the empirical distribution corresponding to the predetermined probability as: and - determining a plurality of candidate confidence intervals based on the plurality of quantile values and the prediction results of the test object, the candidate confidence intervals being defined as lower bounds (which is calculated as the predicted output minus the quantile value) and an upper bound (which is calculated as the predicted output plus the quantile value).
[0096] Through the above iterative process, multiple lower bounds and upper bounds are determined. Then in the second stage, the following operations are iteratively performed: - Based on the observed feature information of the observed object in the observation data set and multiple candidate confidence intervals Multiple lower bounds of , determine the lower bound regression model; -Based on the observation feature information of the observed object in the observation data set and multiple candidate confidence intervals Multiple upper bounds of , determine the upper bound regression model -Use the lower bound regression model to determine the prediction lower bound based on the test feature information of the test object And use the upper bound regression model to determine the prediction upper bound based on the test feature information of the test object And - the confidence interval of the prediction result for the test object is determined by the prediction lower bound and the prediction upper bound.
[0097] The two-stage process described above is summarized in Algorithm 3 (as shown in Table 3). Table 3
[0098] In some embodiments, another two-stage process (Algorithm 4) is provided. In the second stage, by lower bounding the interval Directly fit the regressor And on the upper bound of the interval Directly fit the regressor The computational cost of Algorithm 4 can be reduced. The two-stage process is as described above and summarized in Table 4.
[0099] The first stage is the same as Algorithm 3.
[0100] In the second phase, the intervention dataset 320 Split into training data sets And the calibration dataset m-m1:
[0101] Then, based on the observed feature information of the observed objects in the training data set and multiple candidate confidence intervals Multiple lower bounds of , fitting lower bound regression models Based on the observed feature information of the observed objects in the training data set and multiple candidate confidence intervals Multiple upper bounds of , fitting an upper bound regression model.
[0102] Then, a conformal prediction process is applied using the lower bound regression model, the upper bound regression model and the calibration data set to obtain the lower and upper bounds of the confidence interval of the prediction result of the test object. The conformal prediction process includes based on the calibration data set for i={m1+1,…,m} The corresponding intervention consistency scores of the multiple intervention samples in the calibration dataset are determined by taking the maximum value of the following items for each intervention sample in the multiple intervention samples in represents the difference between the predicted lower bound determined by the lower bound regression model based on the intervention characteristic information of the intervention sample and the expected lower bound of the intervention outcome covering the intervention sample, and Represents the difference between the expected upper bound of the intervention outcome covering the intervention sample and the predicted upper bound determined by the upper bound regression model based on the intervention characteristic information of the intervention sample.
[0103] Then, based at least on the corresponding intervention consistency scores, generate the intervention experience distribution of the corresponding intervention consistency scores Calculate the intervention quantile value of the empirical distribution of the intervention corresponding to the predetermined probability
[0104] Then, using the lower bound regression model To generate a prediction lower bound based on the test feature information of the test object And use the upper bound regression model To generate a prediction upper bound based on the test feature information of the test object The confidence interval for the test object is defined as a lower bound equal to the predicted lower bound minus the intervention quantile value, and an upper bound equal to the predicted upper bound plus the intervention quantile value. The confidence interval is expressed as
[0105] This two-stage process in Algorithm 4 is summarized in Table 4. Table 4
[0106] The above focuses on causal reasoning for counterfactual outcomes Y(0) and Y(1). The above describes confidence intervals for predicted outcomes for test subjects under specific treatments. Figure 3 As shown, for two different treatments, two different groups of observation data sets 310 and intervention data sets 320 can be applied to generate a confidence interval 330-1 for the predicted results for the test object when the first treatment is assigned and / or a confidence interval 330-2 for the predicted results for the test object when the second treatment is assigned.
[0107] In addition, providing confidence intervals for individual treatment effects can have greater practical significance. The algorithm proposed in this paper can predict confidence intervals It has the following equation for potential outcome y under treatment t=1 (or under control t=0): n+m+1 Margin coverage guaranteed.
[0108] In some embodiments, for the purpose of ITE, a confidence interval can be determined for selecting a treatment for the test object based on the confidence interval 330-1 and the confidence interval 330-2. The confidence interval for selecting a treatment for the test object includes the individual treatment effect (ITE) of the test object. In some examples, the lower bound of the confidence interval is calculated as the lower bound of one of the confidence intervals 330-1 or 330-2 associated with the treatment to which the medical intervention is applied minus the upper bound of the other of the confidence intervals 330-1 or 330-2 associated with the treatment not applying the medical intervention. The upper bound of the confidence interval is calculated as the upper bound of one of the confidence intervals 330-1 or 330-2 associated with the treatment to which the medical intervention is applied minus the lower bound of the other of the confidence intervals 330-1 or 330-2 associated with the treatment not applying the medical intervention.
[0109] The original way to construct intervals for ITE is to use the Bonferroni correction, that is, and The empirical results are demonstrated using an original approach for fair comparison between methods for inferring counterfactual outcomes, and results are introduced where a nested approach is used to construct intervals for ITE.
[0110] According to an embodiment of the present disclosure, an improved solution is proposed that provides confidence intervals for predicting counterfactual outcomes and individual treatment effects with guaranteed marginal coverage even under hidden confounding. Strictly speaking, this solution is advantageous over naive methods that use only intervention data or methods that use only observational data. In some embodiments, a two-stage variant with the same guarantee at a lower computational cost is also proposed.
[0111] Figure 4 FIG. 4 is a flowchart of a process 400 for causal reasoning according to some embodiments of the present disclosure. The process 400 may be implemented in Figure 1 At computer system 110.
[0112] At box 410, the computer system 110 generates a first regression model based on at least a first observation data set associated with a first process, the first observation data set including multiple observation samples, the observation samples including observation feature information of the observation object and the observation results of the observation object, and the first process is assigned to the object in the first observation data set based on the observation feature information.
[0113] At box 420, the computer system 110 determines corresponding consistency scores of the plurality of observation samples based on the difference between the prediction results and the observation results in the first observation data set, wherein the prediction results are determined by the first regression model based on the observation feature information of the observation object.
[0114] At box 430, the computer system 110 determines corresponding weights for multiple observation samples based at least on a first intervention data set associated with a first treatment, the first intervention data set including multiple intervention samples, the intervention samples including intervention feature information of intervention objects and intervention results of the intervention objects, and the first treatment is randomly assigned to the intervention objects in the first intervention data set.
[0115] At block 440 , the computer system 110 generates an empirical distribution of respective consistency scores based at least on the respective consistency scores and the respective weights for the plurality of observed samples.
[0116] At block 450 , for the test subject, the computer system 110 determines, based on the empirical distribution and the test feature information of the test subject, a first confidence interval for the predicted result of the test subject if the test subject is assigned the first treatment.
[0117] In some embodiments, determining a first confidence interval of a predicted result for a test object includes: determining a quantile value of an empirical distribution corresponding to a predetermined probability; using a first regression model, based on test feature information of the test object, determining a predicted result of the test object when the first treatment is assigned; and determining a first confidence interval of the predicted result for the test object based on the quantile value and the predicted result of the test object.
[0118] In some embodiments, determining corresponding weights for multiple observation samples based on a first intervention data set associated with a first process includes: determining corresponding density ratios for multiple observation samples and a test density ratio for the test samples based on the first intervention data set and the first observation data set; and determining a weight for each observation sample in the multiple observation samples by calculating a ratio of the density ratio of the observation sample to the sum of the following two items, where the sum is the sum of the corresponding density ratios of the multiple observation samples and the test density ratios.
[0119] In some embodiments, generating the empirical distribution of the respective consistency scores includes generating the empirical distribution of the respective consistency scores based on weighting the respective consistency scores with the respective weights.
[0120] In some embodiments, generating an empirical distribution of corresponding consistency scores includes: for each intervention sample among a plurality of intervention samples, determining a weight for the intervention sample based at least on a first intervention data set; and generating an empirical distribution for the intervention samples by weighting the corresponding consistency scores using the corresponding weights and weighting predetermined scores corresponding to an infinite number of samples using the weights for the intervention samples to obtain multiple empirical distributions for the plurality of intervention samples.
[0121] In some embodiments, determining a first confidence interval for the prediction result of the test object based on the quantile value and the prediction result of the test object includes: determining multiple quantile values of multiple empirical distributions corresponding to predetermined probabilities; determining multiple candidate confidence intervals based on the multiple quantile values and the prediction result of the test object, the candidate confidence intervals being limited by a lower bound and an upper bound; determining a first confidence interval for the prediction result of the test object based on the multiple candidate confidence intervals.
[0122] In some embodiments, determining a first confidence interval of a prediction result of a test object based on multiple candidate confidence intervals includes: determining a lower bound regression model based on observed feature information of the observed object in a first observation data set and multiple lower bounds of multiple candidate confidence intervals; determining an upper bound regression model based on observed feature information of the observed object in the first observation data set and multiple upper bounds of multiple candidate confidence intervals; using the lower bound regression model to determine a prediction lower bound based on test feature information of the test object, and using the upper bound regression model to determine a prediction upper bound based on the test feature information of the test object, wherein the first confidence interval of the prediction result for the test object is defined by a prediction lower bound and a prediction upper bound.
[0123] In some embodiments, determining a first confidence interval of a prediction result for a test object based on multiple candidate confidence intervals includes: dividing a first intervention data set into a training data set and a calibration data set; determining a lower bound regression model based on observed feature information of the observed object in the training data set and multiple lower bounds of multiple candidate confidence intervals; determining an upper bound regression model based on observed feature information of the observed object in the training data set and multiple upper bounds of multiple candidate confidence intervals; and determining a first confidence interval of a prediction result for the test object by applying a conformal prediction process using the lower bound regression model, the upper bound regression model, and the calibration data set to obtain a lower bound and an upper bound of the first confidence interval.
[0124] In some embodiments, determining a first confidence interval of a predicted result for a test object by applying a conformal prediction process includes: determining corresponding intervention consistency scores for multiple intervention samples in the calibration data set based on the maximum of the following items for each of the multiple intervention samples in the calibration data set: the difference between a predicted lower bound determined by a lower bound regression model based on intervention feature information of the intervention sample and an expected lower bound of the intervention result covering the intervention sample, and the difference between an expected upper bound of the intervention result covering the intervention sample and a predicted upper bound determined by an upper bound regression model based on the intervention feature information of the intervention sample; generating an intervention empirical distribution of the corresponding intervention consistency score based on at least the corresponding intervention consistency score; determining an intervention quantile value of the intervention empirical distribution corresponding to a predetermined probability; determining a predicted lower bound based on the test feature information of the test object using a lower bound regression model, and determining a predicted upper bound based on the test feature information of the test object using an upper bound regression model; and determining a first confidence interval having a lower bound equal to the predicted lower bound minus the intervention quantile value, and an upper bound confidence interval equal to the predicted upper bound plus the intervention quantile value.
[0125] In some embodiments, the confidence range is divided into a plurality of confidence units. In some embodiments, generating the first regression model comprises: for each confidence unit in the plurality of confidence units, generating the first regression model based on the first observation data set and an additional test sample consisting of test feature information and the confidence unit to obtain a plurality of first regression models corresponding to the plurality of confidence units; wherein for each first regression model in the plurality of first regression models, determining the corresponding consistency score, determining the corresponding weights for the plurality of observation samples, and generating the empirical distribution are iteratively performed to obtain a plurality of quantile values for the plurality of first regression models.
[0126] In some embodiments, determining a first confidence interval for the predicted result of the test object based on the quantile value and the predicted result of the test object includes: for each first regression model of multiple first regression models, determining a test consistency score for the test sample based on the difference between the predicted output determined by the first regression model and the confidence unit used to generate the first regression model; if it is determined that the test consistency score is less than or equal to the quantile value for the first regression model, combining the confidence units as part of the first confidence interval.
[0127] In some embodiments, process 400 also includes: generating a second regression model based at least on a second observation data set associated with a second treatment, the second observation data set including multiple observation samples, the observation samples including observation feature information of the observation object and the observation results of the observation object, and the second treatment is assigned to the object in the second observation data set based on the observation feature information; determining corresponding consistency scores of the multiple observation samples based on the difference between the predicted results and the observation results in the second observation data set, and the predicted results are determined by the second regression model based on the observation feature information of the observation object; determining corresponding weights for the multiple observation samples based at least on a second intervention data set associated with the second treatment, the second intervention data set including multiple intervention samples, the intervention samples including intervention feature information of the intervention object and the intervention results of the intervention object, and the second treatment is randomly assigned to the intervention object in the second intervention data set; generating another empirical distribution of corresponding consistency scores based at least on the corresponding consistency scores and corresponding weights for the multiple observation samples; and determining a second confidence interval for the predicted results for the test object with the assigned second treatment based on the other empirical distribution and the test feature information of the test object.
[0128] In some embodiments, process 400 further includes determining a confidence interval for selecting a treatment for the test object based on the first confidence interval and the second confidence interval.
[0129] In some embodiments, the confidence interval used to select a treatment for a test subject includes an individual treatment effect (ITE) for the test subject.
[0130] In some embodiments, one of the first treatment and the second treatment includes one of applying a specific medical treatment to the subject and not applying the specific medical treatment to the subject, and the other of the first treatment and the second treatment includes the other of not applying the specific medical treatment to the subject and not applying the specific medical treatment to the subject.
[0131] Figure 5 A block diagram of an apparatus 500 for model training according to some embodiments of the present disclosure is shown. The apparatus 500 may be implemented in or included in Figure 1 The various modules / components in the apparatus 500 may be implemented by hardware, software, firmware or any combination thereof.
[0132] As shown in the figure, the device 500 includes a model generation module 510, which is configured to generate a first regression model based on at least a first observation data set associated with a first process, the first observation data set includes multiple observation samples, the observation samples include observation feature information of the observation object and the observation results of the observation object, and the first process is assigned to the object in the first observation data set based on the observation feature information.
[0133] The device 500 includes a consistency determination module 520, which is configured to determine corresponding consistency scores of multiple observation samples based on the difference between the prediction results and the observation results in the first observation data set, and the prediction results are determined by the first regression model based on the observation feature information of the observation object.
[0134] The device 500 also includes a weight determination module 530, which is configured to determine corresponding weights for multiple observation samples based at least on a first intervention data set associated with a first treatment, the first intervention data set including multiple intervention samples, the intervention samples including intervention feature information of the intervention objects and intervention results of the intervention objects, and the first treatment is randomly assigned to the intervention objects in the first intervention data set.
[0135] The apparatus 500 further includes a distribution generating module 540 configured to generate an empirical distribution of corresponding consistency scores based at least on corresponding consistency scores and corresponding weights for a plurality of observed samples.
[0136] The apparatus 500 further includes a confidence determination module 570 configured to determine, for the test object, based on the empirical distribution and the test feature information of the test object, a first confidence interval of the predicted result of the test object when the test object is assigned the first treatment.
[0137] Apparatus 500 may also include corresponding modules configured to perform operations of process 400 and other embodiments as described herein.
[0138] Figure 6 1 shows a block diagram of an electronic device 600 in which one or more embodiments of the present disclosure may be implemented. It should be understood that Figure 6 The electronic device 600 shown is only an example and should not constitute any limitation on the functionality and scope of the embodiments described herein. The electronic device 600 can be used to implement, for example Figure 1 The electronic device 600 can also be used to implement Figure 5 Device 500.
[0139] like Figure 6 As shown, the electronic device 600 is in the form of a general-purpose computing device. The components of the electronic device 600 may include, but are not limited to, one or more processors or processing units 610, a memory 620, a storage device 630, one or more communication units 640, one or more input devices 650, and one or more output devices 660. The processing unit 610 may be an actual or virtual processor and may perform various processes according to a program stored in the memory 620. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capabilities of the electronic device 600.
[0140] The electronic device 600 typically includes various computer storage media. Such media can be any available media accessible to the electronic device 600, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 620 can be a volatile memory (e.g., a register, a cache, a random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory) or any combination thereof. The storage device 630 can be any removable or non-removable medium, and can include a machine-readable medium, such as a flash drive, a disk, or any other medium, which can be used to store information and / or data (such as training data for training) and can be accessed within the electronic device 600.
[0141] The electronic device 600 may also include additional removable / non-removable, volatile / non-volatile, temporary / non-temporary storage media. Figure 6 620 may include a computer program product 625 having one or more program modules configured to perform various methods or actions of various embodiments of the present disclosure.
[0142] The communication unit 640 communicates with another computing device via a communication medium. In addition, the functions of the components in the electronic device 600 can be implemented by a single computing cluster or multiple computing machines, which can communicate via a communication connection. Therefore, the electronic device 600 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.
[0143] The input device 650 may be one or more input devices, such as a mouse, a keyboard, a trackball, etc. The output device 660 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 600 may also communicate with one or more external devices (not shown) through the communication unit 640 as needed. The external devices (such as storage devices, display devices, etc.) communicate with one or more devices that enable a user to interact with the electronic device 600, or communicate with any device (e.g., a network card, a modem, etc.) that enables the electronic device 600 to communicate with one or more other computing devices. Such communication may be performed via an input / output (I / O) interface (not shown).
[0144] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which a computer-executable instruction or a computer program is stored, and the computer-executable instruction or the computer program is executed by a processor to implement the above method. According to an exemplary implementation of the present disclosure, a computer program product is also provided. The computer program product is physically stored on a non-transitory computer-readable medium and includes a computer-executable instruction, and the computer-executable instruction is executed by a processor to implement the above method.
[0145] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each frame of the flowchart and / or block diagram and the combination of each frame in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0146] These computer-readable program instructions can be provided to the processing unit of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine, and this machine generation device is to realize the function / action specified in one or more boxes in the flow chart and / or block diagram when these instructions are executed by the processing unit of a computer or other programmable data processing device. These computer-readable program instructions can also be stored in a computer-readable storage medium. These instructions enable a computer, a programmable data processing device and / or other equipment to work in an ad hoc manner. Therefore, the computer-readable medium comprising instructions includes a product, and the product includes instructions for realizing the various aspects of the function / action specified in one or more boxes in the flow chart and / or block diagram.
[0147] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps can be executed on the computer, other programmable data processing apparatus, or other device to generate a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0148] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product implemented according to the present disclosure. In this regard, each frame in the flow chart or block diagram can represent a part of a module, a program segment or an instruction, which contains one or more executable instructions for implementing a specified logical function. In some alternative embodiments, the function marked in the frame can also occur in an order different from the order marked in the accompanying drawings. For example, two continuous blocks can actually be executed in parallel, and sometimes can also be executed in reverse order, depending on the functions involved. It should also be noted that each frame in the block diagram and / or flow chart and the combination of frames in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system or by a combination of dedicated hardware and computer instructions that performs a specified function or action.
[0149] Each implementation of the present disclosure has been described above. The above description is exemplary rather than exhaustive and is not limited to the disclosed implementations. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles, practical applications, or technical improvements in the market for each implementation, or to enable other persons of ordinary skill in the art to understand the various embodiments disclosed herein.
Claims
1. A method for causal inference, comprising: generating a first regression model based at least on a first observation data set associated with a first process, the first observation data set comprising a plurality of observation samples, the observation samples comprising observation feature information of an observation object and an observation result of the observation object, the first process being assigned to the object in the first observation data set based on the observation feature information; Determining corresponding consistency scores of the plurality of observation samples based on a difference between a prediction result and an observation result in the first observation data set, the prediction result being determined by the first regression model based on observation feature information of the observation object; determining corresponding weights for the plurality of observation samples based at least on a first intervention data set associated with the first treatment, the first intervention data set comprising a plurality of intervention samples, the intervention samples comprising intervention feature information of intervention subjects and intervention results of the intervention subjects, the first treatment being randomly assigned to the intervention subjects in the first intervention data set; generating an empirical distribution of the corresponding consistency scores based at least on the corresponding consistency scores and the corresponding weights for the plurality of observed samples; as well as For a test object, based on the empirical distribution and the test feature information of the test object, a first confidence interval of a predicted result of the test object when the test object is assigned the first treatment is determined.
2. The method of claim 1 , wherein determining a first confidence interval for the prediction result for the test object comprises: Determining a quantile value of the empirical distribution corresponding to a predetermined probability; using the first regression model, based on the test feature information of the test subject, to determine a predicted outcome for the test subject if the test subject were assigned the first treatment; as well as Based on the quantile value and the predicted result of the test object, a first confidence interval for the predicted result of the test object is determined.
3. The method of claim 1 , wherein determining the respective weights for the plurality of observation samples based on a first intervention data set associated with the first process comprises: determining corresponding density ratios for the plurality of observed samples and a test density ratio for the test sample based on the first intervention data set and the first observation data set; as well as The weight for each of the plurality of observed samples is determined by calculating a ratio of the density ratio of the observed sample to a sum of the corresponding density ratios of the plurality of observed samples and the test density ratio.
4. The method of claim 3, wherein generating the empirical distribution of the corresponding consistency scores comprises: The empirical distribution of the respective consistency scores is generated based on weighting the respective consistency scores with the respective weights.
5. The method of claim 1 , wherein generating the empirical distribution of the corresponding consistency scores comprises: For each intervention sample in the plurality of intervention samples, Determining a weight for the intervention sample based at least on the first intervention data set; as well as An empirical distribution for the intervention samples is generated by weighting the corresponding consistency scores with the corresponding weights and weighting predetermined scores corresponding to an infinite number of samples with the weights for the intervention samples to obtain a plurality of empirical distributions for the plurality of intervention samples.
6. The method of claim 5, wherein determining a first confidence interval for the prediction result for the test object comprises: determining a plurality of quantile values of the plurality of empirical distributions corresponding to the predetermined probabilities; Determining a plurality of candidate confidence intervals based on the plurality of quantile values and the predicted result of the test object, the candidate confidence intervals being bounded by a lower bound and an upper bound; as well as Based on the multiple candidate confidence intervals, the first confidence interval for the prediction result of the test object is determined.
7. The method according to claim 6, wherein determining the first confidence interval of the prediction result of the test object based on the plurality of candidate confidence intervals comprises: Determining a lower bound regression model based on the observation feature information of the observation object in the first observation data set and multiple lower bounds of the multiple candidate confidence intervals; Determining an upper bound regression model based on the observation feature information of the observation object in the first observation data set and multiple upper bounds of the multiple candidate confidence intervals; as well as using the lower bound regression model to determine a prediction lower bound based on the test feature information of the test object, and using the upper bound regression model to determine a prediction upper bound based on the test feature information of the test object, The first confidence interval of the prediction result for the test object is limited by the prediction lower bound and the prediction upper bound.
8. The method of claim 6, wherein determining the first confidence interval of the prediction result for the test object based on the plurality of candidate confidence intervals comprises: Splitting the first intervention dataset into a training dataset and a calibration dataset; Determining a lower bound regression model based on the observed feature information of the observed object in the training data set and multiple lower bounds of the multiple candidate confidence intervals; Determining an upper bound regression model based on the observed feature information of the observed object in the training data set and multiple upper bounds of the multiple candidate confidence intervals; as well as The first confidence interval of the predicted result for the test object is determined by applying a conformal prediction process using the lower bound regression model, the upper bound regression model, and the calibration data set to obtain a lower bound and an upper bound of the first confidence interval.
9. The method of claim 8, wherein determining the first confidence interval of the prediction result for the test object by applying the conformal prediction process comprises: Determine a corresponding intervention consistency score for the plurality of intervention samples in the calibration dataset based on a maximum value of the following for each intervention sample in the plurality of intervention samples in the calibration dataset: the difference between the predicted lower bound determined by the lower bound regression model based on the intervention characteristic information of the intervention sample and the expected lower bound of the intervention outcome covering the intervention sample, and a difference between an expected upper bound of the intervention result covering the intervention sample and a predicted upper bound determined by the upper bound regression model based on intervention feature information of the intervention sample; generating an intervention experience distribution of the corresponding intervention consistency score based at least on the corresponding intervention consistency score; determining an intervention quantile value of the intervention experience distribution corresponding to a predetermined probability; Using the lower bound regression model, determine a prediction lower bound based on the test feature information of the test object, and using the upper bound regression model, determine a prediction upper bound based on the test feature information of the test object; as well as The first confidence interval is determined, the first confidence interval having a lower bound equal to the predicted lower bound minus the intervention quantile value, and an upper confidence interval bound equal to the predicted upper bound plus the intervention quantile value.
10. The method according to claim 1, wherein the confidence range is divided into a plurality of confidence units, and The generating of the first regression model comprises: For each confidence unit in the plurality of confidence units, generating a first regression model based on the first observation data set and an additional test sample consisting of the test feature information and the confidence unit to obtain a plurality of first regression models corresponding to the plurality of confidence units, and For each of the plurality of first regression models, The determination of the respective consistency scores, the determination of the respective weights for the plurality of observed samples, and the generation of the empirical distribution are iteratively performed to obtain a plurality of quantile values for the plurality of first regression models.
11. The method of claim 10, wherein determining the first confidence interval for the predicted result for the test object comprises: For each first regression model in the plurality of first regression models, determining a test consistency score for the test sample based on a difference between a predicted output determined by the first regression model and a confidence unit used to generate the first regression model; as well as If it is determined that the test consistency score is less than or equal to the quantile value for the first regression model, the confidence unit is combined as a part of the first confidence interval.
12. The method according to claim 1, further comprising: generating a second regression model based at least on a second observation data set associated with a second process, the second observation data set comprising a plurality of observation samples, the observation samples comprising observation feature information of an observation object and an observation result of the observation object, the second process being assigned to the object in the second observation data set based on the observation feature information; Determining corresponding consistency scores of the plurality of observation samples based on a difference between a prediction result and an observation result in the second observation data set, the prediction result being determined by the second regression model based on the observation feature information of the observation object; determining corresponding weights for the plurality of observation samples based at least on a second intervention data set associated with the second treatment, the second intervention data set comprising a plurality of intervention samples, the intervention samples comprising intervention feature information of intervention subjects and intervention results of the intervention subjects, the second treatment being randomly assigned to the intervention subjects in the second intervention data set; generating another empirical distribution of the corresponding consistency scores based at least on the corresponding consistency scores and the corresponding weights for the plurality of observed samples; and Based on the another empirical distribution and the test feature information of the test object, a second confidence interval for the predicted result for the test object with the assigned second treatment is determined.
13. The method according to claim 12, further comprising: Based on the first confidence interval and the second confidence interval, a confidence interval is determined for use in selecting a treatment for the test object.
14. The method of claim 13, wherein the confidence interval used to select a treatment for the test subject comprises an individual treatment effect (ITE) for the test subject.
15. The method of claim 1, wherein one of the first process and the second process comprises: One of applying a specific medical treatment to the subject and not applying the specific medical treatment to the subject, and the other of the first treatment and the second treatment includes: the other of not applying the specific medical treatment to the subject and not applying the specific medical treatment to the subject.
16. An electronic device comprising: at least one processing unit; as well as at least one memory coupled to the at least one processing unit and storing instructions executable by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the apparatus to perform: generating a first regression model based at least on a first observation data set associated with a first process, the first observation data set comprising a plurality of observation samples, the observation samples comprising observation feature information of an observation object and an observation result of the observation object, the first process being assigned to the object in the first observation data set based on the observation feature information; Determining corresponding consistency scores of the plurality of observation samples based on a difference between a prediction result and an observation result in the first observation data set, the prediction result being determined by the first regression model based on observation feature information of the observation object; determining corresponding weights for the plurality of observation samples based at least on a first intervention data set associated with the first treatment, the first intervention data set comprising a plurality of intervention samples, the intervention samples comprising intervention feature information of intervention subjects and intervention results of the intervention subjects, the first treatment being randomly assigned to the intervention subjects in the first intervention data set; generating an empirical distribution of the corresponding consistency scores based at least on the corresponding consistency scores and the corresponding weights for the plurality of observed samples; as well as For a test object, based on the empirical distribution and the test feature information of the test object, a first confidence interval of a predicted result of the test object when the test object is assigned the first treatment is determined.
17. The apparatus of claim 16, wherein determining the respective weights for the plurality of observation samples based on a first intervention data set associated with the first process comprises: Determining corresponding density ratios for the plurality of observed samples and a test density ratio for the test sample based on the first intervention data set and the first observation data set; as well as The weight for each of the plurality of observed samples is determined by calculating a ratio of the density ratio of the observed sample to a sum of the corresponding density ratios of the plurality of observed samples and the test density ratio.
18. The apparatus of claim 16, wherein generating the empirical distribution of the corresponding consistency scores comprises: For each intervention sample in the plurality of intervention samples, Determining a weight for the intervention sample based at least on the first intervention data set; as well as generating an empirical distribution for the intervention samples by weighting the corresponding consistency scores with the corresponding weights and weighting predetermined scores corresponding to an infinite number of samples with the weights for the intervention samples to obtain a plurality of empirical distributions for the plurality of intervention samples, and Wherein determining the quantile value of the empirical distribution corresponding to the predetermined probability comprises: A plurality of quantile values of the plurality of empirical distributions corresponding to the predetermined probabilities are determined.
19. The apparatus of claim 18, wherein determining a first confidence interval for the predicted result for the test object based on the quantile value and the predicted result for the test object comprises: Determining a plurality of candidate confidence intervals based on the plurality of quantile values and the predicted result of the test object, the candidate confidence intervals being bounded by a lower bound and an upper bound; as well as Based on the multiple candidate confidence intervals, the first confidence interval for the prediction result of the test object is determined.
20. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by an electronic device, the device is caused to perform the method according to any one of claims 1 to 15.