A Verifiable Calibration Method for Causal Decision Tasks
Through the causal effect estimator and verifiable calibrator in the causal decision model, the problem of causal effect estimation error affecting decision making is solved, and more accurate causal decision-making is achieved.
Patent Information
- Application Number
- CN202410421833.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-09
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2044-04-09
AI Technical Summary
The existing causal effect estimation method leads to causal effect estimation errors under factors such as limited sample size, sample selection bias and poor external validity, which in turn affects the accuracy of decisions and fails to achieve the best decision.
Using a causal decision model, including a causal effect estimator, a proxy causal effect estimator and a verifiable calibrator, the causal effect estimator is calibrated through cross-validation and customization of verifiable loss functions to reduce decision uncertainty and improve decision accuracy.
By calibrating the causal effect estimation model, the differences between causal effect estimation and decision-making tasks are reduced, and the accuracy and reliability of decisions are improved.
Smart Images

Figure CN118333165B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data mining, and more particularly to a verifiable calibration method for causal decision-making tasks. Background Art
[0002] Causal inference aims to explore how actions, interventions, or treatments affect outcomes of interest and plays a crucial role in optimal decision-making, such as in precision medicine, policy-making, personalized recommendations, improvement of teaching strategies, etc. By accurately estimating the conditional average causal effect, i.e., the difference between the expected outcomes of two treatments conditional on covariates, decision-makers can determine the optimal treatment allocation for each subgroup, thereby maximizing the total benefit of the target population. For example, in the targeted advertising scenario in marketing, which aims to identify customers who are more likely to give positive feedback to the advertised products. From a causal perspective, the target users should be those individuals for whom the conditional average causal effect of the advertisement placement on user feedback (e.g., click or conversion) exceeds the cost of the advertisement placement.
[0003] To accurately estimate the conditional average causal effect from observational data, previous methods have strived to balance covariates, such as matching, stratification, outcome regression, weighting, and double-robust methods. With the rise of machine learning, recent causal effect estimation methods have also utilized representation learning, tree-based structures, and generative models, etc. Accurate causal effect estimation can facilitate individualized decision-making by directly allocating the treatment with the maximum expected outcome given the individual covariates. When further considering the treatment cost, the treatment can also be assigned to an individual based on whether the estimated causal effect exceeds the treatment cost. If all the causal effects estimated conditional on covariates are accurate, then the optimal decision can be achieved directly based on the causal effects.
[0004] However, in practical scenarios, due to factors such as limited sample size, sample selection bias, and poor external validity, the estimated causal effect usually does not strictly equal the true causal effect. Since the counterfactual outcomes are unknown, we can only control the estimation error of the causal effect by minimizing the training loss of the observed samples, which may lead to bias in the causal effect estimation and induce a gap between the causal effect estimation task and downstream decision-making. Specifically, even if the estimation error of the causal effect is smaller, it does not necessarily lead to better decision-making results. This is because accurate decision-making depends on precisely stratifying the causal effects according to the decision boundary, rather than merely relying on the estimation error of the causal effect. Summary of the Invention
[0005] The object of the present invention is to solve the problems existing in the prior art and provide a verifiable calibration method for causal decision-making tasks.
[0006] The specific technical solution adopted by the present invention is as follows:
[0007] A verifiable calibration method for causal decision-making tasks, comprising the following steps:
[0008] S1. According to keywords, divide the marketing data into covariates, treatment variables, and outcome variables respectively according to commodity attribute information, commodity promotion strategies, and user purchase intentions, and construct a training dataset using the divided marketing data;
[0009] S2. Obtain a causal decision-making model, which consists of a causal effect estimator, a surrogate causal effect estimator, and a verifiable calibrator. The surrogate causal effect estimator includes a covariate characterization module and two treatment modules, and the calibrator is a fully connected layer with an activation function;
[0010] S3. Use early stopping technology to pre-train the causal effect estimator on the training dataset, and save the optimal parameters of the causal effect estimator after pre-training;
[0011] S4. Use the K-fold cross-validation method to train the surrogate causal effect estimator on the training dataset, and use the surrogate causal effect estimator and the pre-trained causal effect estimator after each fold of training to perform cross-fitting training on the calibrator;
[0012] S5. After both the surrogate causal effect estimator and the calibrator are trained, input the commodity attribute information and commodity promotion strategy to be predicted into the trained causal decision-making model to obtain the prediction result of the user purchase intention.
[0013] Based on the above solutions, each step can be implemented in the following preferred specific ways.
[0014] Preferably, step S4 may specifically include the following sub-steps:
[0015] S41. In the k-th iteration round, select (K - 1) folds of data as the training set, and the remaining one fold of data as the validation set, divide the training dataset into K folds, and initialize the patience value, counter, and optimal loss value;
[0016] S42. Input the training set into the covariate characterization module to obtain the first feature, select a treatment module for feature extraction according to the commodity promotion strategy corresponding to the first feature, output the second feature by the selected treatment module, construct a surrogate loss based on the second feature and the user purchase intention, and update the parameters of the surrogate causal effect estimator separately based on minimizing the surrogate loss;
[0017] S43. Input the validation set into the proxy causal effect estimator with updated parameters to obtain a third feature, and compare the magnitudes of the third feature and the optimal loss value: If the third feature is less than the optimal loss value, then use the third feature as the new optimal loss value, reset the counter to zero, and save the parameters of the proxy causal effect estimator; otherwise, increment the counter by 1.
[0018] S44. Input the validation set into the pre-trained causal effect estimator to obtain a fourth feature; apply the third feature through an indicator function to obtain a proxy decision result; input the third feature and the fourth feature together into a calibrator, and for the evidence obtained by the calibrator, perform element-wise summation and normalization on the evidence to obtain a probability vector corresponding to the optimal decision. Use the probability vector and the proxy decision result to construct a verifiable calibration loss, and update the parameters of the calibrator separately based on minimizing the verifiable calibration loss.
[0019] S45. Continuously iterate the training until both the proxy causal effect estimator and the calibrator converge to obtain a trained calibrator and proxy causal effect estimator.
[0020] Furthermore, the verifiable calibration loss has a functional form of:
[0021]
[0022] where Θ ECal represents the parameters of the calibrator; respectively represent the pre-trained causal effect estimator and the proxy causal effect estimator; represents taking the expectation; then represents the second moment; represents the proxy decision result; p τ (X) represents the probability vector.
[0023] Furthermore, the proxy decision result has a functional form of:
[0024]
[0025] where represents the decision boundary; represents the indicator function; represents the output result of the proxy causal effect estimator, x represents the value of the commodity attribute information, h((1) represents the output of the first processing module when the decision is 1, and h((0) represents the output of the second processing module when the decision is 0.
[0026] Furthermore, the probability vector p τ (X) has a functional form of:
[0027]
[0028] represents the normalization term; represents the evidence obtained by the calibrator; [1, 1] represents a two-dimensional vector with all element values being 1.
[0029] Preferably, the surrogate loss has a functional form of:
[0030]
[0031] where n represents the total number of marketing data; w i represents the weight; X i represents the product attribute information in the i-th marketing data; T i represents the product promotion strategy in the i-th marketing data; Y i represents the user purchase intention in the i-th marketing data; Φ(·) represents the covariate characterization module; h(·) represents the processing module; Φ(X i ) represents the features output by the covariate characterization module; h(Φ(X i ), T i ) represents the output result of the processing module; γ is a hyperparameter that controls the weight of the loss function; MMD(·) represents the maximum mean discrepancy; represents a model complexity term.
[0032] Furthermore, the weight w i has a functional form of:
[0033]
[0034] where represents the proportion of the treatment group samples in the population; represents whether to promote the product in the i-th marketing data.
[0035] Preferably, the covariate characterization module is formed by cascading three fully connected layers with activation functions in sequence.
[0036] Preferably, the processing module is formed by cascading three fully connected layers with activation functions in sequence.
[0037] Preferably, the causal effect estimator adopts S-Learner.
[0038] Compared with the background technology, the present invention has the following beneficial effects:
[0039] Compared with making decisions directly using the estimated causal effect, the method of the present invention aligns the decision probability modeled based on the estimated causal effect with the surrogate decision result at the expected level, and reduces the uncertainty of the decision probability along the decision boundary, thereby improving the accuracy of the decision. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a flowchart of the steps of the whole present invention;
[0041] Figure 2 It is a schematic diagram of the causal effect estimation and causal decision difference in this embodiment;
[0042] Figure 3 It is a schematic structural diagram of the causal decision model in this embodiment;
[0043] Figure 4 It is a schematic diagram of the training process of the surrogate estimator in this embodiment;
[0044] Figure 5 It is a schematic diagram of the training process of the calibrator in this embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0045] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following detailed description of the specific embodiments of the present invention will be given with reference to the accompanying drawings. Many specific details are set forth in the following description to facilitate a thorough understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below. The technical features in the various embodiments of the present invention can be combined correspondingly without conflict.
[0046] In the description of the present invention, it should be understood that the terms "first" and "second" are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of such features.
[0047] The objective of the present invention is to bridge the gap between causal effect estimation and decision-making tasks. Specifically, the calibration property of the causal effect estimation model can be utilized to improve causal decision-making. Intuitively, when the calibrated causal effect estimation model corresponds to a 90% treatment decision probability, then 90% of the individuals making that decision should be assigned to the treatment group as their optimal treatment decision. Calibration is a necessary condition for making accurate decisions using a causal effect estimation model. That is to say, if the calibration property is not satisfied, then the decisions made based on the estimated causal effect will become suboptimal. Therefore, in order to ensure accurate decisions based on causal effect estimation, it is necessary to ensure the satisfaction of the calibration property. However, implementing such calibration faces a fundamental challenge because the optimal decision, which is the calibration target, is unobservable in the observed sample. In observational studies, the lack of clear prior knowledge about the optimal treatment and reward function hinders the direct application of supervised learning to obtain the optimal strategy.
[0048] As Figure 2 shown, this is an example in the field of online marketing, where the goal is to target individuals for whom the positive gain (causal effect) exceeds the treatment allocation cost (decision boundary). Two estimators are used to measure the causal effect, and it is observed that estimator 1 exhibits a higher prediction error than estimator 2. However, in the online marketing task, the decision-making performance of estimator 1 exceeds that of estimator 2. This observation demonstrates the difference between causal effect estimation and downstream decision-making tasks.
[0049] To address the difference between causal effect estimation and downstream decision-making tasks, the present invention provides a verifiable calibration method (ECal) for causal decision-making tasks, which is a prognostic method that can seamlessly connect causal effect estimation and causal decision-making tasks. The method starts with a pre-trained estimator to generate a pre-trained causal effect, and is supplemented with a carefully designed alternative estimator for calibration to approximate the actual decision distribution. The method of the present invention is rooted in the principles of evidence theory, uses uncertainty measures to improve the calibration of causal effect estimation in causal decision-making tasks, and combines the use of cross-fitting and a customized verifiable loss function to constrain the estimated causal effect, as Figure 1 shown, and it includes the following steps:
[0050] S1. According to keywords, divide the marketing data into covariates, treatment variables, and outcome variables respectively according to product attribute information, product promotion strategies, and user purchase intentions, and construct a training dataset using the divided marketing data.
[0051] In an embodiment of the present invention, step S1 can be specifically implemented through the following sub-steps:
[0052] S11. Using keywords, from the marketing data Extract the product attribute information, product promotion strategy, and user purchase intention from it, and use them as multi-dimensional covariates, one-dimensional binary treatment variables, and one-dimensional continuous outcome variables respectively. Among them, n represents the total number of marketing data. The product attribute information is a covariate that is not manipulated by the experimenter doing data analysis but still affects the user purchase intention and contains confounding factors, represents the q-th product attribute in the i-th marketing data S i where Q represents the total dimension of the product attributes. The product promotion strategy is the treatment (intervention) variable of the marketing data, indicating whether to promote the product in the i-th marketing data, being 0 means no promotion, being 1 means promotion. The user purchase intention is the continuous outcome variable (response variable) of the product promotion strategy in the marketing data, representing the user purchase intention in the i-th marketing data.
[0053] S12. Represent each marketing data used for training as a triple S = (X, T, Y), and construct a training dataset.
[0054] In this embodiment, assume that a certain marketing scenario is that the user wants to take a taxi. The product attribute information represents user information and available vehicle information, etc. The product promotion strategy refers to the historical record of taxi coupons issued, and the user purchase intention refers to the predicted probability of the user taking a taxi. When this probability reaches a preset value, it is considered that a coupon needs to be issued to this user.
[0055] S2. Obtain a causal decision model. The above causal decision model consists of a causal effect estimator, a surrogate causal effect estimator, and a verifiable calibrator. The above surrogate causal effect estimator includes a covariate characterization module and two processing modules. The above calibrator is a fully connected layer with an activation function.
[0056] It should be noted that in step S2 of the present invention, as Figure 3As shown, the causal effect estimator used is arbitrary as long as it is applicable to causal decision-making tasks. It can be any causal effect estimator that needs to be calibrated, including but not limited to: S-Learner, a single-headed neural network method that directly regresses the outcome variable using the treatment variable and covariates; Causal Forest, a method that uses random forests for causal inference, where each leaf node represents an estimated causal effect, and the tree partitioning criterion is to maximize the heterogeneity between the estimated causal effects; CFRNet, a two-headed deep model with an additional constraint that the covariate representation is independent of the treatment variable; DragonNet, a three-headed deep model, with one head for estimating the propensity score and the remaining two heads for regressing the outcomes of the treatment and control groups. Additionally, targeted regularization is introduced to achieve a more robust estimate; GANITE, a method that uses generative adversarial networks to infer individual-level causal effects. To maintain generality, in the present invention, S-Learner composed of pure fully connected layers is taken as an example. Specifically, S-Learner is sequentially cascaded by a fully connected layer of size Q×M, two fully connected layers of size M×M, a fully connected layer of size M×N, a fully connected layer of size N×N, and a fully connected layer of size N×1. Except for the last fully connected layer, an ELU activation function is connected after each of the other fully connected layers.
[0057] It should be noted that in step S2 of the present invention, as Figure 3 shown, the above proxy causal effect estimator includes a covariate representation module and two treatment modules. The covariate representation module is sequentially cascaded by three fully connected layers with activation functions, and the treatment module is sequentially cascaded by three fully connected layers with activation functions. In this embodiment, the proxy causal effect estimator is set as CFRNet, and its specific structure is described as follows: 1) The covariate representation module Φ, which is sequentially cascaded by a fully connected layer of size Q×M and two fully connected layers of size M×M, and an ELU activation function is connected after each of the fully connected layers. 2) Two treatment modules h0 and h1, which have the same structure and are sequentially cascaded by a fully connected layer of size Q×M, a fully connected layer of size N×N, and a fully connected layer of size N×1. Except for the last fully connected layer, an ELU activation function is connected after each of the other fully connected layers.
[0058] It should be noted that in step S2 of the present invention, as Figure 3 shown, the verifiable calibrator Ψ is constructed, and its specific structure consists of a fully connected layer of size W×W and a SoftPlus activation function.
[0059] In this embodiment, M is set to 200, N is set to 100, and W is set to 2.
[0060] S3. Use the early stopping technique to pre-train the causal effect estimator on the above training dataset, and save the optimal parameters of the causal effect estimator after pre-training.
[0061] In addition, it should be noted that in step S3 of the present invention, the S-Learner is trained using the early stopping technique, and the parameters of the causal effect estimator with the best effect are saved. Specifically, initialize the patience value PA = 5, the counter counter = 0, and the optimal loss value best_loss = inf, and then start training. After each round of training, test on the validation set to obtain the validation result val_loss. Compare the sizes of the validation result val_loss and the optimal loss value best_loss: if val_loss < best_loss, then update best_loss = val_loss, set the counter counter = 0, and record the current parameters; if val_loss ≥ best_loss, then update the counter counter = counter + 1. When the counter counter > PA, stop training.
[0062] S4. Use the K-fold cross-validation method to train the surrogate causal effect estimator on the above training dataset, and use the surrogate causal effect estimator and the pre-trained causal effect estimator after each fold of training to perform cross-fitting training on the above calibrator.
[0063] It should be noted that in step S4 of the present invention, as Figure 4 、 Figure 5 shown, the specific training processes of the surrogate causal effect estimator and the calibrator are as follows:
[0064] S41. In the k-th iteration round, select (K - 1) folds of data as the training set, and the remaining one fold of data as the validation set, and divide the above training dataset into K folds, and initialize the patience value, the counter, and the optimal loss value.
[0065] In this embodiment S41, K represents the number of folds, that is, it needs to be trained K times, and k represents the index of the iteration round. When initializing, the above parameters are respectively set as: patience value PA = 5, counter counter = 0, optimal loss value best_loss = inf, and then start training.
[0066] S42. Input the above training set into the covariate characterization module to obtain the first feature Φ(X i ), and according to the commodity promotion strategy T corresponding to the first feature Φ(X i ) iSelect a processing module for feature extraction, and output the second feature h(Φ(X i ), T i ) by the selected processing module. Based on the second feature h(Φ(X i ), T i ) and the user purchase intention Y i Construct a surrogate loss, and update the parameters of the surrogate causal effect estimator separately based on minimizing the surrogate loss.
[0067] It should be noted that in the surrogate causal effect estimator of step S42 of the present invention, the input data first undergoes feature extraction by the covariate characterization module. Since each sample in the training set corresponds to a commodity promotion strategy T i , therefore, an appropriate processing module can be selected according to the commodity promotion strategy (T = 0 or T = 1) of each sample. After selecting the processing module, the extracted feature output by the processing module is used as the final output of the processing module.
[0068] It should be noted that in step S42 of the embodiment of the present invention, the above surrogate loss has the following functional form:
[0069]
[0070] where n represents the total number of marketing data; w i represents the weight; X i represents the commodity attribute information in the i-th marketing data; T i represents the commodity promotion strategy in the i-th marketing data; Y i represents the user purchase intention in the i-th marketing data; Φ(·) represents the covariate characterization module; h(·) represents the processing module; Φ(X i ) represents the feature output by the covariate characterization module; h(Φ(X i ), T i ) represents the second feature, that is, in the case of the control group T i = 0 or the treatment group T i = 1, after inputting the feature output by the covariate characterization module into the processing module, the result output by the processing module; γ is a hyperparameter that controls the weight of the loss function; MMD(·) represents the maximum mean discrepancy, which is a correlation-independent metric used to balance the covariate characterization of the treatment group and the control group; is a model complexity term, which is only related to the model structure and data and does not participate in training after the model is determined.
[0071] Furthermore, the functional form of the above weight w i is:
[0072]
[0073] Among them, represents the proportion of the treatment group samples in the population (all samples).
[0074] S43. Input the above verification set into the surrogate causal effect estimator with updated parameters to obtain the third feature Compare the third feature with the optimal loss value: If the third feature is less than the optimal loss value, then take the third feature as the new optimal loss value, reset the counter to zero, and save the parameters of the surrogate causal effect estimator; otherwise, increment the counter by 1.
[0075] S44. Input the above verification set into the pre-trained causal effect estimator to obtain the fourth feature Take the third feature through the indicator function to obtain the surrogate decision result Take the third feature and the fourth feature and input them together into the calibrator Ψ. For the evidence obtained by the calibrator, after summing the elements of the evidence and normalizing, obtain the probability vector p τ (X) corresponding to the optimal decision. Use the probability vector p τ (X) corresponding to the optimal decision and the surrogate decision result to construct the verifiable calibration loss, and update the parameters of the calibrator separately based on minimizing the verifiable calibration loss.
[0076] It should be noted that in step S44 of the present invention, given the commodity attribute information X, the main objective of the calibrator is to minimize the verifiable calibration loss The functional form of this loss is:
[0077]
[0078]
[0079] Among them, Θ ECal represents the parameters of the calibrator; respectively represent the pre-trained causal effect estimator and the surrogate causal effect estimator. represents taking the expectation. represents the surrogate decision result (decision based on estimating the conditional average causal effect), and the probability of decision decision then represents the second moment; p τ (X) represents the optimal decision a based on the true conditional average causal effect τ The probability vector corresponding to (X).
[0080] It should be noted that in step S44 of the present invention, the above-mentioned surrogate decision result has the functional form of:
[0081]
[0082] where, represents the decision boundary; represents the indicator function; represents the output result of the surrogate causal effect estimator, x represents the value of the commodity attribute information, h(1) represents the output of the first processing module when the decision is 1, and h(0) represents the output of the second processing module when the decision is 0. The symbol | represents given.
[0083] Furthermore, similar to the functional form of the surrogate decision result the optimal decision a τ (X) based on the true conditional average causal effect has the functional form of:
[0084]
[0085] where, represents the true conditional average causal effect given the commodity attribute information X = x; Y(1) represents the potential outcome when the treatment is 1; Y(0) represents the potential outcome when the treatment is 0; | represents given; is an indicator function. c represents the decision boundary, which can be adjusted accordingly according to the processing task and the data set. In this embodiment, the decision boundary can be understood as the cost required to impose a marketing strategy, and the decision boundary is set to an arbitrary real number.
[0086] It should be noted that in step S44 of the present invention, after summing the evidence output by the calibrator element by element and normalizing, the probability vector p τ (X) corresponding to the optimal decision is obtained. This probability vector p τ (X) is obtained by summing element by element, and its functional form is:
[0087]
[0088]
[0089] where, represents the normalization term to ensure that the probabilities derived from the evidence e(X) sum to 1; represents the evidence obtained by the calibrator; [1, 1] represents a two-dimensional vector with all element values being 1.
[0090] Further, for the probability vector p τ The probability corresponding to each decision j ∈ {0, 1} in (X) Its functional form is:
[0091]
[0092] where the decision a τ (X) represents that when j = 1, it means deciding to apply treatment T = 1, and conversely, when j = 0, it means deciding not to apply treatment T = 0. e j (X) represents the evidence value corresponding to each decision in the evidence e(X).
[0093] S45. Continuously iterate and train until both the surrogate causal effect estimator and the calibrator converge, obtaining the trained calibrator and surrogate causal effect estimator
[0094] In this embodiment S45, the early stopping technique is used, and the parameters with the best effects of the surrogate causal effect estimator and the calibrator are respectively recorded.
[0095] S5. When both the surrogate causal effect estimator and the calibrator are trained, input the commodity attribute information to be predicted and the commodity promotion strategy into the trained causal decision model to obtain the prediction result of the user's purchase intention.
[0096] It should be noted that in step S5 of the present invention, when step S4 is completed and the optimal parameters of the surrogate causal effect estimator and the calibrator are both saved, and the causal effect estimator has also been pre-trained on the training set, at this time, it is considered that the causal decision model has been trained, and the trained causal decision model can be used for inference. During the inference process, first input the commodity attribute information to be predicted into the pre-trained causal effect estimator to output features. Then input the commodity attribute information to be predicted and the commodity promotion strategy together into the trained surrogate causal effect estimator. In this module, the input data first passes through the covariate characterization module for feature extraction, and then the extracted features are respectively input into two processing modules, that is, calculate the outputs of the two processing modules by setting T = 0 and T = 1 respectively, and then take the expectation of the output difference, that is To obtain the final output features of the processing module Then input the output features of the causal effect estimator and the final output features of the processing module together into the calibrator. The calibrator outputs the probability vector corresponding to the optimal decision, selects the maximum probability value from this probability vector, and takes the decision corresponding to the maximum probability value as the prediction result of the user's purchase intention.
[0097] Embodiment
[0098] This embodiment discloses the Infant Health and Development Program (IHDP) dataset and the Jobs dataset.
[0099] The Infant Health and Development Program (IHDP) dataset contains 747 twin samples. Each sample contains 6 pre-intervention continuous variables and 19 discrete variables related to the qualities of the infant and its mother, aiming to study the impact of an early special home visit teacher on the future intellectual development of the infant. This embodiment divides the dataset into a training set, a validation set, and a test set based on a ratio of 63% / 27% / 10%. And make assumptions about its dose-response function, and then generate a semi-synthetic dataset corresponding to step S1.
[0100] The Jobs dataset contains 3,212 observational data. Each data contains 17 pre-intervention covariates, such as age, education level, income, etc., aiming to study the impact of job training on the employment rate. This embodiment divides the dataset into a training set, a validation set, and a test set based on a ratio of 60% / 20% / 20%. Similarly, make assumptions about its dose-response function, and then generate a semi-synthetic dataset corresponding to step S1.
[0101] To objectively evaluate the performance of this algorithm, for the IHDP data and Jobs data, this embodiment randomly performs 100 times and 10 times of data shuffling and model retraining, and embeds ECal into 5 different pre-trained causal effect estimators to calculate the calibrated decision error rate. In the IHDP and Jobs experiments, the mean and its standard deviation (mean±std) of the MSE, and the calculation formula of the decision error rate (ER) are as follows:
[0102]
[0103] The obtained experimental results are shown in Table 1 and Table 2. The results show that the verifiable calibration method of the present invention can significantly improve the performance of the causal effect estimation method in decision-making.
[0104] Table 1 MSE error (mean±std) of the decision error rate of ECal on the IHDP dataset
[0105]
[0106] Table 2 MSE error (mean±std) of the decision error rate of ECal on the Jobs dataset
[0107]
[0108]
[0109] Among them, S-Learner is a causal effect estimation model composed of a single fully connected neural network, which is derived from the prior art literature: R Künzel, Jasjeet S Sekhon, Peter J Bickel, and Bin Yu. 2019. Metalearners for estimating heterogeneous treatment effects using machine learning. Proceedings of the national academy of sciences 116, 10 (2019), 4156–4165. Causal Forest is a forest-based causal effect estimation model, which is derived from the existing technical literature: Stefan Wager and Susan Athey. 2018. Estimation and inference of heterogeneous treatment effects using random forests. J. Amer. Statist. Assoc. 113, 523 (2018), 1228–1242. Dragon Forest is a causal effect estimation model composed of three-headed neural networks, which is derived from the existing technical literature: Claudia Shi, David Blei, and Victor Veitch. 2019. Adapting neural networks for the estimation of treatment effects. Advances in neural information processing systems 32 (2019). GANITE is a causal effect estimation model composed of generative adversarial neural networks, which is derived from the existing technical literature: Jinsung Yoon, James Jordon, and Mihaela Van Der Schaar. 2018. GANITE: Estimation of individualized treatment effects using generative adversarial nets. In International conference on learning representations.CFRNet is a causal effect estimation model composed of a dual-headed neural network combined with a representation balance constraint, which is derived from the existing technical literature: Uri Shalit, Fredrik D Johansson, and David Sontag. 2017. Estimating individual treatment effect: generalization bounds and algorithms. In International conference on machine learning. PMLR, 3076–3085.
[0110] The above-described embodiments are only several preferred solutions of the present invention, but they are not intended to limit the present invention. Those of ordinary skill in the relevant technical field can still make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, all technical solutions obtained by means of equivalent replacement or equivalent transformation fall within the protection scope of the present invention.
Claims
1. A verifiable calibration method for causal decision-making tasks, characterized in that, It includes the following steps: S1. According to keywords, divide the marketing data into covariates, treatment variables, and outcome variables respectively according to product attribute information, product promotion strategies, and user purchase intentions, and construct a training dataset using the divided marketing data; S2. Obtain a causal decision-making model, which consists of a causal effect estimator, a surrogate causal effect estimator, and a verifiable calibrator. The surrogate causal effect estimator includes a covariate characterization module and two treatment modules, and the calibrator is a fully connected layer with an activation function; S3. Use early stopping technology to pre-train the causal effect estimator on the training dataset, and save the optimal parameters of the pre-trained causal effect estimator; S4. Use the K-fold cross-validation method to train the surrogate causal effect estimator on the training dataset, and use the surrogate causal effect estimator and the pre-trained causal effect estimator after each fold of training to perform cross-fitting training on the calibrator; S5. After both the surrogate causal effect estimator and the calibrator are trained, input the product attribute information and product promotion strategies to be predicted into the trained causal decision-making model to obtain the prediction result of the user purchase intention; The specific process of step S4 is as follows: S41. In the k-th iteration round, select (K - 1) folds of data as the training set, and the remaining one fold of data as the validation set. Divide the training dataset into K folds, and initialize the patience value, counter, and optimal loss value; S42. Input the training set into the covariate characterization module to obtain the first feature. Select a treatment module for feature extraction according to the product promotion strategy corresponding to the first feature, and output the second feature by the selected treatment module. Construct a surrogate loss based on the second feature and the user purchase intention, and update the parameters of the surrogate causal effect estimator separately based on minimizing the surrogate loss; S43. Input the validation set into the surrogate causal effect estimator with updated parameters to obtain the third feature. Compare the size of the third feature and the optimal loss value: If the third feature is less than the optimal loss value, take the third feature as the new optimal loss value, reset the counter, and save the parameters of the surrogate causal effect estimator; otherwise, increment the counter by 1; S44. Input the validation set into the pre-trained causal effect estimator to obtain the fourth feature; pass the third feature through the indicator function to obtain the surrogate decision result; input the third feature and the fourth feature together into the calibrator, and obtain the evidence by the calibrator. After element-wise summing and normalizing the evidence, obtain the probability vector corresponding to the optimal decision. Construct a verifiable calibration loss based on the probability vector and the surrogate decision result, and update the parameters of the calibrator separately based on minimizing the verifiable calibration loss; S45. Continuously iterate the training until both the surrogate causal effect estimator and the calibrator converge to obtain the trained calibrator and surrogate causal effect estimator.
2. The verifiable calibration method for causal decision-making tasks according to claim 1, wherein The verifiable calibration loss has the following functional form: Among them, Θ ECal represents the parameter of the calibrator; respectively represent the pre-trained causal effect estimator and the surrogate causal effect estimator; represents taking the expectation; then represents the second moment; represents the surrogate decision result; p τ (X) represents the probability vector.
3. The verifiable calibration method for causal decision-making tasks according to claim 1, wherein The said proxy decision result has the following functional form: Among them, represents the decision boundary; represents the indicator function; represents the output result of the proxy causal effect estimator, x represents the value of the commodity attribute information, h(1) represents the output of the first processing module when the decision is 1, and h(0) represents the output of the second processing module when the decision is 0.
4. The verifiable calibration method for causal decision-making tasks according to claim 2, characterized in that, The probability vector p τ (X) has the following functional form: represents a normalization term; represents the evidence obtained by the calibrator; [1, 1] represents a two-dimensional vector with all element values being 1.
5. The verifiable calibration method for causal decision-making tasks according to claim 1, wherein, The proxy loss has the following functional form: Among them, n represents the total number of marketing data; w i represents the weight; X i represents the product attribute information in the i-th marketing data; T i represents the product promotion strategy in the i-th marketing data; Y i represents the user purchase intention in the i-th marketing data; Φ(·) represents the covariate characterization module; h(·) represents the processing module; Φ(X i ) represents the feature output by the covariate characterization module; h(Φ(X i ), T i ) represents the output result of the processing module; γ is a hyperparameter that controls the weight of the loss function; MMD(·) represents the maximum mean discrepancy; represents a model complexity term.
6. The verifiable calibration method for causal decision-making tasks according to claim 5, wherein The weight w i has the following functional form: Among them, represents the proportion of the treatment group samples in the population; T i 1 indicates whether to promote the product in the i-th marketing data.
7. A verifiable calibration method for causal decision-making tasks according to claim 1, characterized in that The covariate characterization module is composed of three cascaded fully connected layers with activation functions.
8. The verifiable calibration method for causal decision-making tasks according to claim 1, wherein, The processing module is successively cascaded by three fully connected layers with activation functions.
9. The verifiable calibration method for causal decision-making tasks according to claim 1, characterized in that, The causal effect estimator adopts S-Learner.
Citation Information
Patent Citations
Construction of causal inference model based on gradient boosting tree and related device
CN117313863A
Methods, systems and devices comprising support vector machine for regulatory sequence features
WO2016183348A1