Causal effect estimation method, system, device and medium based on double machine learning
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- UNIV OF SCI & TECH OF CHINA
- Filing Date
- 2024-03-12
- Publication Date
- 2026-08-07
AI Technical Summary
[0002]推断因果效应在医疗、金融、营销等领域都至关重要,它有助于解答人们常见的反事实推断,也就是评估干预或控制后的结果相较于另一种潜在结果的差异有多大;此处提到的两种潜在结果分别为干预后的结果和控制后的结果,但确定对对象进行干预或控制后,只能观测到一种潜在结果;例如确定进行干预后,另一种潜在结果即为控制后的结果,是无法进行观测的
[0017] As can be seen from the technical solution provided by the present invention, based on dual machine learning, the estimation methods for regression functions and propensity scores can be flexibly selected, and even under the root mean square error, the convergence rate of the estimation of regression functions and propensity scores is only n. -1/4 The causal effect remains asymptotically normal; based on dual machine learning, the robustness of the model is improved, and it can effectively handle high-dimensional features; based on clustering, the problem caused by insufficient intervention samples can be solved by using a large amount of information from control samples; overall, the solution provided by this invention can improve the performance of causal effect estimation, obtain more accurate causal effect estimation results, and thus better answer common counterfactual inferences.
Smart Images

Figure CN118095436B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of causal effect estimation technology, and in particular to a causal effect estimation method, system, device and medium based on dual machine learning. Background Technology
[0002] Inferring causal effects is crucial in fields such as medicine, finance, and marketing. It helps answer common counterfactual inferences, namely, assessing how different the outcome of intervention or control is from another potential outcome. The two potential outcomes mentioned here are the outcome after intervention and the outcome after control. However, once it is determined that intervention or control has been carried out on the subject, only one potential outcome can be observed. For example, once it is determined that intervention has been carried out, the other potential outcome is the outcome after control, which cannot be observed.
[0003] However, existing mainstream causal effect inference methods lack statistical performance guarantees and perform poorly in complex or high-dimensional problems. Therefore, it is necessary to study new schemes to improve the performance of causal effect estimation so as to better answer common counterfactual inferences. Summary of the Invention
[0004] The purpose of this invention is to provide a causal effect estimation method, system, device, and medium based on dual machine learning, which can improve the performance of causal effect estimation and thus better answer common counterfactual inferences.
[0005] The objective of this invention is achieved through the following technical solution:
[0006] A causal effect estimation method based on dual machine learning includes:
[0007] Collect observational data in the relevant field, including: information about the observed object, the types of things that act on the observed object, and the results of the types of things acting on the observed object;
[0008] For all observed data, k-means clustering is performed based on the information of the observed objects to divide all observed data into k categories;
[0009] For each category of observation data, it is randomly divided into K folds. Each time, K-1 folds of data are taken out and combined with a dual machine learning model to obtain regression function estimates and propensity score estimates. The causal effect is estimated on the remaining fold of data using the regression function estimates and propensity score estimates. After repeating K times, the K causal effect estimates obtained are combined to obtain the causal effect estimation results of the observation data of the corresponding category.
[0010] A causal effect estimation system based on dual machine learning includes:
[0011] The data collection unit is used to collect observation data in the relevant field. The observation data includes: information about the observed object, the types of things that act on the observed object, and the results of the types of things acting on the observed object.
[0012] Clustering unit is used to perform k-means clustering on all observed data based on the information of the observed objects, dividing all observed data into k categories;
[0013] The causal effect estimation unit is used to randomly divide the observation data of each category into K folds. In each iteration, K-1 folds of data are taken out and combined with a dual machine learning model to obtain regression function estimates and propensity score estimates. The causal effect is estimated on the remaining fold of data using the regression function estimates and propensity score estimates. After repeating K times, the K causal effect estimates are combined to obtain the causal effect estimation results of the observation data of the corresponding category.
[0014] A processing device includes: one or more processors; and a memory for storing one or more programs;
[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned method.
[0016] A readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned method.
[0017] As can be seen from the technical solution provided by the present invention, based on dual machine learning, the estimation methods for regression functions and propensity scores can be flexibly selected, and even under the root mean square error, the convergence rate of the estimation of regression functions and propensity scores is only n. -1 / 4 The causal effect remains asymptotically normal; based on dual machine learning, the robustness of the model is improved, and it can effectively handle high-dimensional features; based on clustering, the problem caused by insufficient intervention samples can be solved by using a large amount of information from control samples; overall, the solution provided by this invention can improve the performance of causal effect estimation, obtain more accurate causal effect estimation results, and thus better answer common counterfactual inferences. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1A flowchart illustrating a causal effect estimation method based on dual machine learning, provided for an embodiment of the present invention;
[0020] Figure 2 A schematic diagram of the dual machine learning component provided in an embodiment of the present invention;
[0021] Figure 3 A schematic diagram of a causal effect estimation system based on dual machine learning provided in an embodiment of the present invention;
[0022] Figure 4 This is a schematic diagram of a processing device provided in an embodiment of the present invention. Detailed Implementation
[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.
[0024] First, the following explanations are provided for the terms that may be used in this article:
[0025] The term "and / or" means that either or both can be achieved simultaneously. For example, X and / or Y means that it includes both "X" or "Y" as well as the three cases of "X and Y".
[0026] The terms “including,” “comprising,” “containing,” “having,” or other similar semantic descriptions should be interpreted as non-exclusive inclusion. For example, “including a technical feature element (such as raw material, component, ingredient, carrier, dosage form, material, size, part, component, mechanism, device, step, process, method, reaction conditions, processing conditions, parameter, algorithm, signal, data, product or article of manufacture, etc.)” should be interpreted as including not only the expressly listed technical feature element, but also other technical feature elements that are not expressly listed and are well-known in the art.
[0027] The following provides a detailed description of a causal effect estimation method, system, device, and medium based on dual machine learning provided by this invention. Contents not described in detail in the embodiments of this invention are prior art known to those skilled in the art. Where specific conditions are not specified in the embodiments of this invention, they are performed according to conventional conditions in the art or conditions recommended by the manufacturer. Where the manufacturers of the instruments used in the embodiments of this invention are not specified, they are all conventional products that can be purchased commercially.
[0028] Example 1
[0029] This invention provides a causal effect estimation method based on dual machine learning, such as... Figure 1 As shown, the main steps include the following:
[0030] Step 1: Collect observational data in the relevant field.
[0031] In this embodiment of the invention, the observation data includes: information about the observed object (covariate), the type of thing acting on the observed object (intervention variable), and the result of the thing type acting on the observed object (output result).
[0032] For example, in the medical field, assuming the observational data is treatment data related to a certain antihypertensive drug, the observational data can be constructed using hospital medical records, represented as {W}. t =(X t T t Y t )}, where X t Covariates (high-dimensional features) represent characteristics of an individual, such as X. t =Age, gender, height, weight, blood sugar, family history; T t Y represents the intervention variable, reflecting whether an individual receives drug treatment; 0 indicates no drug treatment, and 1 indicates receiving drug treatment. t The output reflects the individual's treatment outcome, specifically the numerical value of blood pressure reduction. Typically, when T=1, the sample is the intervention sample, and when T=0, the sample is the control sample.
[0033] Similarly, in the financial field, assuming the observed data {W} t =(X t T t Y t Let X represent the impact of a financial institution's loan interest rate on a user's loan amount. t Information about the observed object reflects the characteristics of an individual, such as X. t =Total assets, employment, education, credit rating; T t To represent the type of thing acting on the observed object, reflecting different levels of loan interest rates, taking two levels as an example, 0 and 1 represent different levels respectively. For example, 0 represents a high interest rate, and 1 represents a low interest rate; Y t This refers to the result of the type of thing acting on the observed object, reflecting the amount of loan a user takes out at different loan interest rates. In the marketing field, assuming the observed data {W} t =(X t T t Y t )} represents the impact of different types of coupons (e.g., 50 off for purchases over 300, 20 off directly) from a certain store on user purchasing behavior, where X t Information about the observed object reflects the characteristics of an individual, such as X.t =Purchase history, browsing history; T t To represent the type of thing acting on the observed object, reflecting different coupon types, 0 represents one type of coupon (e.g., a coupon for 50 off purchases over 300), and 1 represents another type of coupon (e.g., a coupon for a direct discount of 20); Y t This represents the result of the type of thing acting on the observed object, reflecting the user's purchase volume under different coupon types.
[0034] Step 2: Perform k-means clustering on all observed data based on the information of the observed objects, and divide all observed data into k categories.
[0035] In this embodiment of the invention, the elbow method is used to train multiple k-means clustering models simultaneously by selecting different k values, and then selecting the final k-means clustering model. Specifically, a critical point can be selected where the mean squared error is greatly improved at a certain point and then slowly decreases as the final k value, thus selecting the final k-means clustering model. Using the final k-means clustering model, k-means clustering is performed based on the information of the observed objects, dividing all observed data into k categories {C1, ..., C2}. k}, where C i Let i be the observation data of the i-th category, i = 1, ..., k. Specifically, the final k-means clustering model h(X) can be used to map the information of the observed objects to categories [k] = {1, ..., k}, thereby dividing all the observation data into k categories.
[0036] Step 3: For the observation data of each category, randomly divide it into K folds. Each time, take out K-1 folds of data and combine them with the dual machine learning model to obtain the regression function estimate and the propensity score estimate. Use the regression function estimate and the propensity score estimate to estimate the causal effect on the remaining fold of data. Repeat this process K times, and combine the K causal effect estimates to obtain the causal effect estimation result of the observation data of the corresponding category.
[0037] In this embodiment of the invention, for the observation data C of the i-th category... i Its size is denoted as N. i Randomly divided into K folds Each fold has a data size of n. j =N i / K, for each j∈[K]={1,...,j}, define K-1 fold data. In other words, C i Data I after discount i,j Obtain K-1 discount data Since j has K possible values, therefore, K-1 fold data There are K ways to choose, therefore, the calculation can be repeated K times to obtain K causal effect estimates.
[0038] For each calculation: using the first machine learning model, on the K-1 fold data The regression function estimate of the result Y of the observation object after the object type acts on the observation object, which contains information X about the observation object, and the object type T acting on the observation object. Using a second machine learning model on K-1 fold data Construct a propensity score estimate for the type T of the observed object. (i.e., the probability of intervening in feature X), taking the medical field provided earlier as an example, the estimator This refers to estimating the probability of receiving drug treatment based on feature X. Then, the causal effect is estimated on the remaining one-fold data using regression function estimators and propensity score estimators.
[0039] In this embodiment of the invention, the causal effect estimate can be obtained by solving the following estimation equation.
[0040]
[0041] Among them, W l For the remaining fold data I i,j The observation data in W l =(X l T l Y l ), X l T l Y l The observed data W l The information in the observed object, the type of thing acting on the observed object, and the result after the type of thing acts on the observed object. ψ(.) is about the parameter Neyman orthogonal score, here For the target parameters, For interference parameters.
[0042] In this embodiment of the invention, for the observation data C of the i-th category... i The estimate of a single causal effect is denoted as Calculate the mean of the K causal effect estimators Represented as:
[0043]
[0044] in, This represents the magnitude of the difference between intervention and control in the i-th category.
[0045] Mean C, the observation data of the i-th category i The causal effect estimation results.
[0046] The observation data for all k categories were processed in the above manner to obtain the corresponding causal effect estimation results.
[0047] For example, the first machine learning model can employ a regression random forest or a LASSO (Least Absolute Shrinkage and Selection Operator) regression model, while the second machine learning model can use a classification random forest model, such as... Figure 2 The diagram shown illustrates the dual machine learning components.
[0048] Based on the above-described scheme of the present invention, causal effect prediction can be performed: for a given information x of an observed object, the causal effect can be predicted. That is, based on the information x of the observed object, the corresponding category h(x) is obtained through clustering, and then the causal effect estimation result on category h(x) (that is, the result that has been calculated before) is used as the causal effect estimation result. The more accurate the prediction, the better it can answer common counterfactual inferences.
[0049] For example, in the medical field, the intervention is whether or not treatment is administered, and the causal effect estimate measures the magnitude of individual differences in treatment outcomes. Such predictive results can serve as intermediate information for subsequent medical research. Similarly, in the financial field, it can better answer common counterfactual inferences, better understand the relationships between various research subjects, and formulate relevant control strategies to achieve cost reduction and efficiency improvement. In the field of advertising recommendation (i.e., marketing), the intervention is whether or not to place advertisements, which can better identify target audiences and achieve personalized advertising recommendations.
[0050] Based on the above introduction, the causal effect estimation scheme of the present invention can ultimately establish corresponding regression models for variables Y, T, and X, as follows:
[0051] Y = g(T, X) + U, E P [U|X,T]=0
[0052] T = m(X) + V, E P [V|X]=0
[0053] Where U and V are noise terms, E P [U|X,T] represents the conditional expectation of the noise term U given the information X of the observed object and the type of thing T acting on the observed object, E P[V|X] represents the conditional expectation of the noise term V given the information X of the observed object.
[0054] The regression model described above, within the SCM (Structure Causal Model) framework, characterizes the causal relationship between variables Y, T, and X, where X is a confounder, meaning a variable that simultaneously affects the intervention T allocation and the output Y.
[0055] The above-described solution provided in this invention, based on dual machine learning, improves the robustness of the regression model and can effectively handle high-dimensional features; based on clustering, it can solve the problem of insufficient intervention samples by using information from a large number of control samples; overall, the solution provided by this invention can improve the performance of causal effect estimation, obtain more accurate causal effect estimation results, and thus better answer common counterfactual inferences.
[0056] Through the above description of the embodiments, those skilled in the art can clearly understand that the above embodiments can be implemented by software, or by using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions of the above embodiments can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, mobile hard drive, etc.), including several instructions to cause a computer device (such as a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0057] Example 2
[0058] This invention also provides a causal effect estimation system based on dual machine learning, which is mainly used to implement the methods provided in the foregoing embodiments, such as... Figure 3 As shown, the system mainly includes:
[0059] The data collection unit is used to collect observation data in the relevant field. The observation data includes: information about the observed object, the types of things that act on the observed object, and the results of the types of things acting on the observed object.
[0060] Clustering unit is used to perform k-means clustering on all observed data based on the information of the observed objects, dividing all observed data into k categories;
[0061] The causal effect estimation unit is used to randomly divide the observation data of each category into K folds. In each iteration, K-1 folds of data are taken out and combined with a dual machine learning model to obtain regression function estimates and propensity score estimates. The causal effect is estimated on the remaining fold of data using the regression function estimates and propensity score estimates. After repeating K times, the K causal effect estimates are combined to obtain the causal effect estimation results of the observation data of the corresponding category.
[0062] Since the technical details of each unit in this system have been described in detail in the previous embodiment 1, they will not be repeated here.
[0063] Those skilled in the art will understand that, for the sake of convenience and brevity, the above-described division of functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the system can be divided into different functional modules to complete all or part of the functions described above.
[0064] Example 3
[0065] The present invention also provides a processing device, such as Figure 4 As shown, it mainly includes: one or more processors; a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in the foregoing embodiments.
[0066] Furthermore, the processing device also includes at least one input device and at least one output device; in the processing device, the processor, memory, input device, and output device are connected via a bus.
[0067] In this embodiment of the invention, the specific types of the memory, input device, and output device are not limited; for example:
[0068] Input devices can be touchscreens, image acquisition devices, physical buttons, or mice, etc.
[0069] The output device can be a display terminal;
[0070] The memory can be random access memory (RAM) or non-volatile memory, such as disk storage.
[0071] Example 4
[0072] The present invention also provides a readable storage medium storing a computer program that, when executed by a processor, implements the method provided in the foregoing embodiments.
[0073] In this embodiment of the invention, the readable storage medium is a computer-readable storage medium and can be disposed in the aforementioned processing device, for example, as a memory in the processing device. Furthermore, the readable storage medium can also be any medium capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk.
[0074] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A causal effect estimation method based on dual machine learning, characterized in that, include: Collect observational data within the relevant field. This observational data includes: information about the observed object, the types of things acting on the observed object, and the results of these types of things acting on the observed object. The relevant field includes: the medical field, and the observational data is... , It represents information about the observed object and reflects the characteristics of the individual; It indicates the type of thing acting on the observed object, reflecting whether the individual receives drug treatment; It indicates the result of the type of thing acting on the observed object, and reflects the result of individual treatment; For all observed data, k-means clustering is performed based on the information of the observed objects to divide all observed data into k categories; For each category of observation data, it is randomly divided into K folds. Each time, K-1 folds of data are taken out and combined with a dual machine learning model to obtain regression function estimates and propensity score estimates. The causal effect is estimated on the remaining fold of data using the regression function estimates and propensity score estimates. After repeating K times, the K causal effect estimates are combined to obtain the causal effect estimation results of the observation data of the corresponding category. For each category of observation data, it is randomly divided into K folds. Each time, K-1 folds of data are taken and combined with a dual machine learning model to obtain the regression function estimate and propensity score estimate, including: For the Observational data for each category Its size is recorded as Randomly divided into K folds The data size of each fold is For each Define K-1 fold data ; Using the first machine learning model, on K-1 fold data The regression function estimate of the result Y of the observation object after the object type acts on the observation object, which contains information X about the observation object, and the object type T acting on the observation object. Using a second machine learning model on K-1 fold data Construct a propensity score estimate for the type T of the observed object. .
2. The causal effect estimation method based on dual machine learning according to claim 1, characterized in that, The process of performing k-means clustering on all observed data based on the information of the observed objects to divide all observed data into k categories includes: The elbow method is used to train multiple k-means clustering models simultaneously by selecting different k values, and then select the final k-means clustering model. Using the final k-means clustering model, k-means clustering is performed based on the information of the observed objects, dividing all observed data into k categories. ,in, For the first Observational data for each category, .
3. The causal effect estimation method based on dual machine learning according to claim 1, characterized in that, The estimation of causal effects on the remaining one-fold data using regression function estimators and propensity score estimators includes: The causal effect estimate is obtained by solving the following method. : ; in, For the remaining 1 / 2 fold data The observation data in , Observational data The information in the observed object, the type of thing acting on the observed object, and the result after the type of thing acts on the observed object. , For parameters Neyman's orthogonal score.
4. A causal effect estimation method based on dual machine learning according to claim 1 or 3, characterized in that, The causal effect estimation results obtained from the K causal effect estimators obtained by synthesis for the corresponding categories of observation data include: For the Observational data for each category The estimator of a single causal effect is denoted as Calculate the mean of K causal effect estimators. , represented as: ; Among them, among them, Indicates the first The magnitude of the differences in intervention and control across categories; Mean As the first Observational data for each category The causal effect estimation results.
5. The causal effect estimation method based on dual machine learning according to claim 1, characterized in that, Also includes: Given information x about an observed object, predicting causal effects means predicting causal effects based on the given information about the observed object. Obtain the corresponding category through clustering , categorize The causal effect estimation results are used as the causal effect estimation results. .
6. A causal effect estimation system based on dual machine learning, characterized in that, include: The data collection unit is used to collect observational data within a specific field. This observational data includes: information about the observed object, the types of things acting on the observed object, and the results of these types of things acting on the observed object. The relevant field includes the medical field, and the observational data is... , It represents information about the observed object and reflects the characteristics of the individual; It indicates the type of thing acting on the observed object, reflecting whether the individual receives drug treatment; It indicates the result of the type of thing acting on the observed object, and reflects the result of individual treatment; Clustering unit is used to perform k-means clustering on all observed data based on the information of the observed objects, dividing all observed data into k categories; The causal effect estimation unit is used to randomly divide the observation data of each category into K folds. Each time, K-1 folds of data are taken out and combined with a dual machine learning model to obtain the regression function estimate and the propensity score estimate. The causal effect is estimated on the remaining fold of data using the regression function estimate and the propensity score estimate. After repeating K times, the K causal effect estimates are combined to obtain the causal effect estimation result of the observation data of the corresponding category. For each category of observation data, it is randomly divided into K folds. Each time, K-1 folds of data are taken and combined with a dual machine learning model to obtain the regression function estimate and propensity score estimate, including: For the Observational data for each category Its size is recorded as Randomly divided into K folds The data size of each fold is For each Define K-1 fold data ; Using the first machine learning model, on K-1 fold data The regression function estimate of the result Y of the observation object after the object type acts on the observation object, which contains information X about the observation object, and the object type T acting on the observation object. Using a second machine learning model on K-1 fold data Construct a propensity score estimate for the type T of the observed object. .
7. A processing device, characterized in that, include: One or more processors; Memory, used to store one or more programs; Wherein, when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method as described in any one of claims 1 to 5.
8. A readable storage medium storing a computer program, characterized in that, When a computer program is executed by a processor, it implements the method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Anti-fact prediction and effect evaluation method and system
CN116151485A
Causal effect estimation method and system based on semi-separated representation
CN117436524A