Continuous intervention effect prediction method, training method, device, equipment and medium
By combining multi-head self-attention interaction and reversible flow networks, this method addresses the shortcomings of existing technologies in estimating continuous intervention effects, achieving high-precision causal effect prediction. It possesses high expressive power and continuity, making it suitable for fields such as e-commerce advertising optimization, precision marketing, and medical drug dosage optimization.
Patent Information
- Application Number
- CN202511212373.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2025-12-12
AI Technical Summary
Existing techniques fail to meet the requirements of high expressiveness, ADRF continuity, anticollinearity, and interpretability when estimating the effects of continuous interventions. They often rely on parametric assumptions or discretize continuous treatment variables, leading to inaccurate estimation of causal effects.
We employ a multi-head self-attention interaction, reversible flow network, and smooth basis function mapping approach. By embedding covariates and estimating the conditional distribution of processed variables, we generate the main network parameters and use the conditional distribution to weight the prediction results, thus constructing an end-to-end prediction network.
It achieves high-precision prediction of continuous intervention effects, possesses high expressive power, ADRF continuity and anti-collinearity, and improves the accuracy and interpretability of causal effect estimation.
Smart Images

Figure CN121120124A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to artificial intelligence, big data and deep learning technologies, specifically to a method, training method, apparatus, device and medium for predicting continuous intervention effects. Background Technology
[0002] With the explosive growth of mobile web marketing and advertising, the causal impact of refined and quantifiable continuous strategies (such as exposure frequency and discount intensity) on user behavior has become a core requirement for improving campaign ROI and user lifetime value.
[0003] However, existing methods for estimating the effects of continuous interventions often rely on parameterization assumptions or discretization of continuous treatment variables, which still cannot meet the key requirements of current continuous intervention effect estimation for high expressiveness, ADRF (Average Dose-Response Function) continuity, anticollinearity, and interpretability. Summary of the Invention
[0004] This disclosure provides a method, training method, apparatus, device, and medium for predicting the effects of continuous interventions.
[0005] According to one aspect of this disclosure, a method for predicting the effects of a continuous intervention is provided, comprising:
[0006] Multi-head self-attention interaction is performed on the covariates to obtain the covariate embeddings;
[0007] The covariate embedding and processing variables are input into a reversible flow network, wherein the reversible flow network is used to estimate the conditional distribution of the processing variables under the covariate conditions;
[0008] The processing variables are mapped to processing vectors using smoothing basis functions, and network parameters for each layer in the main network are generated based on the different processing variables in the processing vectors.
[0009] The covariate embedding and the processing vector are input into the main network, wherein the main network is used to calculate the fusion feature based on the network parameters of each layer according to the covariate embedding and the processing vector, and output the initial prediction result according to the fusion feature;
[0010] The initial prediction results are weighted using the conditional distribution to obtain the target prediction result of the dependent variable under the continuous intervention of the covariate and the treatment variable.
[0011] According to another aspect of this disclosure, a method for training a prediction network for continuous intervention effects is provided, wherein the prediction network includes a covariate feature extraction module, a conditional density estimation module composed of a reversible flow network, a dynamic fully connected layer module, and a processing regressor module as the main network, the method comprising:
[0012] The covariate feature extraction module performs multi-head self-attention interaction on the covariates to obtain the covariate embeddings.
[0013] The covariate embedding and processing variables are input into the reversible flow network, wherein the reversible flow network is used to estimate the conditional distribution of the processing variables under the covariate conditions, the conditional distribution being represented by negative log-likelihood, which is calculated based on the flow density formula;
[0014] Through the dynamic fully connected layer module, the processing variables are mapped to processing vectors through smooth basis functions, and the network parameters of each layer in the main network are generated according to the different processing variables in the processing vectors.
[0015] The covariate embedding and the processing vector are input into the main network, wherein the main network is used to calculate the fusion features based on the network parameters of each layer according to the covariate embedding and the processing vector, and output the prediction results according to the fusion features;
[0016] The density estimate loss is constructed based on the negative log-likelihood, and the regression loss is constructed based on the prediction results.
[0017] A joint loss is generated based on the density estimation loss, the regression loss, and the smoothness regularization term of the prediction result curve. The prediction network is then trained end-to-end based on the joint loss.
[0018] According to another aspect of this disclosure, a method for predicting continuous intervention effects is provided for a prediction network, the prediction network comprising a covariate feature extraction module, a conditional density estimation module composed of a reversible flow network, a dynamic fully connected layer module, and a processing regressor module as the main network, wherein the method includes:
[0019] The covariate feature extraction module performs multi-head self-attention interaction on the covariates to obtain the covariate embeddings.
[0020] Through the dynamic fully connected layer module, the processing variables are mapped to processing vectors through smooth basis functions, and the network parameters of each layer in the main network are generated according to the different processing variables in the processing vectors.
[0021] The covariate embedding and the processing vector are input into the main network, wherein the main network is used to calculate the fusion features based on the network parameters of each layer according to the covariate embedding and the processing vector, and output the prediction results according to the fusion features;
[0022] The reversible flow network is used to estimate the conditional distribution of the processing variable under the covariate condition, wherein the conditional distribution is represented by the negative log-likelihood, which is calculated based on the flow density formula.
[0023] The prediction network is trained end-to-end based on a joint loss, which includes a density estimation loss, a regression loss, and a prediction result curve smoothness regularization term. The density estimation loss is constructed based on the negative log-likelihood, and the regression loss is constructed based on the prediction result.
[0024] According to another aspect of this disclosure, a device for predicting continuous intervention effects is provided, comprising:
[0025] The covariate embedding acquisition module is used to perform multi-head self-attention interaction on covariates to obtain covariate embeddings;
[0026] The first input module is used to input the covariate embedding and processing variables into the reversible flow network, wherein the reversible flow network is used to estimate the conditional distribution of the processing variables under the covariate conditions;
[0027] The network parameter generation module is used to map the processing variables into processing vectors through smoothing basis functions, and generate network parameters for each layer in the main network based on the different processing variables in the processing vectors.
[0028] The second input module is used to input the covariate embedding and the processing vector into the main network, wherein the main network is used to calculate the fusion feature based on the network parameters of each layer according to the covariate embedding and the processing vector, and output the initial prediction result according to the fusion feature;
[0029] The target prediction result calculation module is used to perform weighted calculation on the initial prediction result using the conditional distribution to obtain the target prediction result of the dependent variable under the continuous intervention of the covariate and the treatment variable.
[0030] According to another aspect of this disclosure, a training apparatus for a predictive network of continuous intervention effects is provided, wherein the predictive network includes a covariate feature extraction module, a conditional density estimation module composed of a reversible flow network, a dynamic fully connected layer module, and a processing regressor module as the main network, the apparatus comprising:
[0031] The covariate embedding acquisition unit is used to perform multi-head self-attention interaction on the covariate through the covariate feature extraction module to obtain the covariate embedding;
[0032] The first input unit is used to input the covariate embedding and processing variables into the reversible flow network, wherein the reversible flow network is used to estimate the conditional distribution of the processing variables under the covariate conditions, the conditional distribution being represented by negative log-likelihood, the negative log-likelihood being calculated based on the flow density formula;
[0033] The network parameter generation unit is used to map the processing variables into processing vectors through the smoothing basis function via the dynamic fully connected layer module, and generate network parameters for each layer in the main network based on the different processing variables in the processing vectors.
[0034] The second input unit is used to input the covariate embedding and the processing vector into the main network, wherein the main network is used to calculate the fusion feature based on the network parameters of each layer according to the covariate embedding and the processing vector, and output the prediction result according to the fusion feature;
[0035] A loss construction unit is used to construct a density estimate based on the negative log-likelihood and to construct a regression loss based on the prediction results.
[0036] The training unit is used to generate a joint loss based on the density estimation loss, the regression loss, and the prediction result curve smoothness regularization term, and to train the prediction network end-to-end based on the joint loss.
[0037] According to another aspect of this disclosure, a predictive apparatus for continuous intervention effects is provided, for a predictive network, the predictive network including a covariate feature extraction module, a conditional density estimation module composed of a reversible flow network, a dynamic fully connected layer module, and a processing regressor module as the main network, wherein the apparatus includes:
[0038] The extraction unit is used to perform multi-head self-attention interaction on the covariates through the covariate feature extraction module to obtain the covariate embedding;
[0039] The generation unit is used to map the processing variables into processing vectors through the smoothing basis function using the dynamic fully connected layer module, and generate network parameters for each layer in the main network based on the different processing variables in the processing vectors.
[0040] The main network processing unit is used to input the covariate embedding and the processing vector into the main network, wherein the main network is used to calculate the fusion feature based on the network parameters of each layer according to the covariate embedding and the processing vector, and output the prediction result according to the fusion feature;
[0041] The reversible flow network is used to estimate the conditional distribution of the processing variable under the covariate condition, wherein the conditional distribution is represented by the negative log-likelihood, which is calculated based on the flow density formula.
[0042] The prediction network is trained end-to-end based on a joint loss, which includes a density estimation loss, a regression loss, and a prediction result curve smoothness regularization term. The density estimation loss is constructed based on the negative log-likelihood, and the regression loss is constructed based on the prediction result.
[0043] According to another aspect of this disclosure, an electronic device is provided, comprising:
[0044] At least one processor; and
[0045] A memory communicatively connected to the at least one processor; wherein,
[0046] The memory stores instructions that can be executed by the at least one processor, which enables the at least one processor to perform the prediction method for continuous intervention effects and the training method for the prediction network for continuous intervention effects as described in any embodiment of this disclosure.
[0047] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions for causing a computer to execute the prediction method for continuous intervention effects and the training method for the prediction network for continuous intervention effects described in any embodiment of this disclosure.
[0048] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method for predicting the continuous intervention effect and the method for training the predictive network for the continuous intervention effect according to any embodiment of this disclosure.
[0049] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0050] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0051] Figure 1 This is a schematic diagram of a method for predicting the effects of continuous interventions according to an embodiment of the present disclosure;
[0052] Figure 2This is a schematic diagram of a training method for a prediction network of continuous intervention effects according to an embodiment of the present disclosure;
[0053] Figure 3 This is a schematic diagram of another method for predicting the continuous intervention effect according to an embodiment of the present disclosure;
[0054] Figure 4 This is a predictive network architecture diagram according to embodiments of the present disclosure;
[0055] Figure 5 This is a general flowchart of the prediction process according to embodiments of this disclosure;
[0056] Figure 6 This is a schematic diagram of a device for predicting continuous intervention effects according to an embodiment of the present disclosure;
[0057] Figure 7 This is a schematic diagram of a training apparatus for a predictive network of continuous intervention effects according to an embodiment of the present disclosure;
[0058] Figure 8 This is a schematic diagram of a predictive device for a continuous intervention effect according to an embodiment of the present disclosure;
[0059] Figure 9 This is a block diagram of an electronic device used to implement the prediction method for continuous intervention effects according to embodiments of the present disclosure. Detailed Implementation
[0060] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0061] ADRF is a function used to describe the causal relationship between different levels (dosages) of a treatment variable (or intervention variable) and the average level of an outcome variable (dependent variable).
[0062] LT stands for Lifetime Value, which is a metric that measures the total value a user brings to a company during their interaction with a product / service.
[0063] Figure 1This is a flowchart illustrating a method for predicting the continuous intervention effect according to an embodiment of the present disclosure. This embodiment is applicable to predicting the dependent variable under continuous intervention of covariates and treatment variables, i.e., predicting the ADRF curve of the outcome variable. It relates to the field of computer technology, particularly artificial intelligence, big data, and deep learning technologies. The method can be executed by a continuous intervention effect prediction device, implemented in software and / or hardware, preferably configured in an electronic device, such as a computer or server. Figure 1 As shown, the method specifically includes the following:
[0064] S101. Perform multi-head self-attention interaction on the covariates to obtain the covariate embeddings.
[0065] S102. The covariate embedding and the processing variable are input into the reversible flow network, wherein the reversible flow network is used to estimate the conditional distribution of the processing variable under the covariate condition.
[0066] S103. Map the processing variables to processing vectors using smoothing basis functions, and generate network parameters for each layer in the main network based on the different processing variables in the processing vectors.
[0067] S104. Input the covariate embedding and processing vector into the main network, wherein the main network is used to calculate the fusion features based on the network parameters of each layer according to the covariate embedding and processing vector, and output the initial prediction results according to the fusion features.
[0068] S105. Using conditional distributions, the initial prediction results are weighted to obtain the target prediction result of the dependent variable under continuous intervention of covariates and treatment variables.
[0069] In continuous intervention effect estimation, treatment variables refer to intervention variables actively applied by researchers or systems at continuous different levels (dosages), such as exposure frequency or discount intensity. Their causal impact on outcome variables (such as user behavior, ROI, etc.) is the core object of the study. Covariates refer to other characteristic variables besides the core treatment variables that may affect the outcome variables. Covariates include multi-source heterogeneous data such as user profiles, behavioral indicators, and sequences. Covariates are characterized by high dimensionality, sparsity, and strong interaction; for example, users' age, gender, historical click records, and browsing duration. They may act together with treatment variables on outcome variables. If not handled properly, they can introduce bias and variance risks into subsequent treatment density estimation and effect regression, introducing confounding bias and affecting the accuracy of causal effect estimation.
[0070] In this embodiment, multi-head self-attention interaction is performed on the covariates to obtain covariate embeddings. That is, the attention mechanism is used to dynamically focus on key variables in the covariates, alleviate collinearity, and improve the robustness of downstream causal inference.
[0071] Among them, multi-head self-attention interaction is performed on the covariates to obtain covariate embeddings, including:
[0072] Map the fields in the covariates to a multidimensional dense vector, and generate the input sequence based on the multidimensional dense vector;
[0073] In a network with multiple stacked self-attention layers, multi-order self-attention interactions are performed on the input sequence, where each self-attention layer constructs multiple parallel attention heads;
[0074] The outputs of multiple parallel attention heads are concatenated and transformed to obtain covariate embeddings.
[0075] Specifically, each categorical field in the covariate is mapped to a d-dimensional dense vector using an embedding layer, and each numerical field is first normalized and then linearly mapped to d dimensions, thus forming an input sequence of covariates of length m, which can be represented as E = [e 1 ;e 2 ;…;e m ],in, Then, construct H parallel intention heads, represented as follows:
[0076] Multi-order interactions include second-order interactions and third-order and higher interactions. For second-order interactions, the attention weights in the i→j header directly reflect the field-to-field dependency. For third-order and higher interactions, due to the stacking of multiple self-attention layers in the network, such as the Transformer, the i→j output of the first layer interacts with the third field k, forming the path i→j→k. More layers can simulate higher-order combinations such as i→j→k→l.
[0077] After multi-head self-attention interaction, the H multi-head outputs are concatenated using either a separate CLS token (CLS is a special token placed at the beginning of the input sequence, representing the summary representation) or full-sequence averaging pooling, and linearly transformed into the final covariate embedding, represented as... This embedding carries rich high-level interaction information and reflects the importance of fields through attention weights, which can be used by subsequent modules.
[0078] Therefore, the covariate processing method in this embodiment naturally supports arbitrary-order feature combinations through hierarchical attention, possessing high-order interactive expressive capabilities. Simultaneously, it makes attention weights visible, allowing the network to focus only on the most relevant fields for each sample, significantly suppressing redundant or highly correlated variables and minimizing the distortion of causal effect estimation caused by multicollinearity. Furthermore, the directly output attention matrix represents the inter-field dependency weights, facilitating the diagnosis of which covariates are most critical for effect prediction at different processing levels. Finally, self-supervised pre-training can be performed on massive amounts of unlabeled tabular data, followed by fine-tuning in marketing scenarios to enhance the network's generalization and robustness under small sample sizes.
[0079] Next, in this embodiment of the disclosure, covariate embedding and processing variables are input into a reversible flow network, wherein the reversible flow network is used to estimate the conditional distribution of the processing variables under the covariate conditions.
[0080] In causal inference, it is necessary to accurately estimate the distribution p(T|X) of the processing variable T under given covariate X in order to perform weighted or reconstructed decongestion. Invertible Neural Networks (INNs) are neural network models that achieve data generation and inference through reversible transformations. In this embodiment, an invertible neural network is used to achieve high degrees of freedom and low bias density fitting of continuous processing.
[0081] In this process, the processing variable T can first be mapped to a standard interval (e.g., [0,1]) and preprocessed with simple translation or scaling before conditional modulation transformation. Specifically, the reversible flow network can adopt a coupling layer structure such as RealNVP (Real Non-Volume Preserving) or Glow. Each coupling layer divides the processing variable T into a first component and a second component. The first component remains unchanged, and the second component undergoes an affine transformation under the conditions of the first component and covariate embedding. This can be expressed by the formula: y1=x1;y2=x2⊙exp(s(x1,z x ))+t(x1,z x ), where s(·) and t(·) are both small neural networks, and the input includes the output of the previous layer and the covariate embedding z. x Connecting L coupling layers in series, the overall transformation is denoted as:
[0082] In this embodiment of the disclosure, the conditional distribution is represented by the negative log-likelihood, which is calculated based on the flux density formula. That is, the negative log-likelihood is calculated based on the flux density formula:
[0083]
[0084] The baseline distribution pz is usually a standard normal distribution.
[0085] Therefore, in this embodiment, conditional density estimation is based on a reversible flow network. The reversible flow network does not require discrete binning and can fit distributions of arbitrary shapes, such as multimodal, asymmetric, and long-tailed distributions. Furthermore, the transformation is continuously differentiable with respect to T throughout the process, and can be used for gradient optimization and smoothing regularization of T downstream. In addition, the affine functions s and t of each layer receive z... x As an additional input, density estimation can be strictly dependent on covariates, improving the decontamination effect.
[0086] Next, in this embodiment, the processing variables are mapped to processing vectors using smoothing basis functions. Based on the different processing variables in the processing vectors, network parameters for each layer of the main network are generated. The purpose is to dynamically adjust the weights or activation functions of the prediction network according to the processing variable t, thereby capturing non-homogeneous effects at different processing levels and enhancing the model's ability to express causal effects. The modulated main network then performs layer-by-layer transformations on the covariate embeddings and other features, outputting a dynamic representation.
[0087] First, basis function expansion is performed, mapping the processing variable t to a processing vector φ(T) using B-splines or other smooth basis functions. Then, weights can be generated using a hypernetwork; that is, the processing vector is input into the hypernetwork, which outputs the network parameters of each layer in the main network, including weight parameters and biases. Specifically, a small hypernetwork H is designed, taking φ(T) as input and outputting the weight parameters W of each layer of the main network. l =H l (φ(T)) and bias b l Where l represents the number of layers in the network.
[0088] Furthermore, the processing vector can be input into a feature-wise linear modulation (FiLM) layer. This layer generates scaling and offsets for intermediate features in each layer of the main network, allowing for affine transformations of the intermediate features based on these scaling and offsets, while the weights in the main network remain unchanged. Specifically, fixed weights are retained in the main network, and the scaling γ is calculated only using the FiLM layer. l (φ) and offset β l (φ), for intermediate activation h l Perform affine transformation: h l ′ =γ l (φ)⊙h l +β l (φ).
[0089] Therefore, embodiments of this disclosure utilize a supernetwork or FiLM to enable the main network to obtain optimal weights or activation affines at each T, accurately simulating the function shape under different processing conditions. Compared to learning an independent network for each T, the supernetwork and FiLM have lower parameter overhead while maintaining continuity. Simultaneously, the generated weights or affine modulation pairs φ(T) are continuously differentiable, ensuring the ADRF is smooth over T.
[0090] Next, in this embodiment of the disclosure, the covariate embedding and processing vector is input into the main network, wherein the main network is used to calculate the fusion features based on the network parameters of each layer according to the covariate embedding and processing vector, and output the initial prediction results according to the fusion features.
[0091] The main network consists of a multi-head self-attention layer and a feedforward network. The multi-head self-attention layer is used to perform multi-head self-attention calculation based on the network parameters of each layer according to the covariate embedding and processing vector to obtain the fused features. The feedforward network is used to output the initial prediction result based on the fused features.
[0092] During computation in the multi-head self-attention layer, Query is a linear mapping of the processing vector φ(T), and both Key and Value are covariate embeddings z. x Multi-head attention computation can be represented as: The outputs of H heads are concatenated and linearly fused to obtain the fused feature A. A is then input into a small feedforward network (MLP) to output the initial prediction result.
[0093] Therefore, in this embodiment, the attention weights obtained through conditional feature selection in the main network reveal which covariates are most critical to the result given a T, thus improving interpretability. Simultaneously, the multi-head parallel network focuses on multiple dependency patterns, enhancing nonlinear representation.
[0094] Finally, in this embodiment, the initial prediction results are weighted using conditional distributions to obtain the target prediction result of the dependent variable under the continuous intervention of covariates and treatment variables. That is, the initial prediction results are weighted using the probability density of the conditional distribution, giving the network dual robustness.
[0095] In one implementation, it can be Substituting these values into the nonparametric estimation equation yields a biroleum-based estimator. Thus, if either μ or π exists in the model space of the neural network, a (asymptotically) correct estimator can be obtained, calculated as follows:
[0096]
[0097] Where Y represents the observed outcome; T represents the actual treatment received; and X represents covariates, which are background variables or user characteristics, such as age, gender, and interests. This represents the prediction value (initial prediction result) of the prediction network, that is, the prediction of the result Y given the treatment T and covariate X; The propensity score represents the probability of accepting treatment T given feature X; it is the output of the inverse network that estimates the conditional distribution. This represents the empirical distribution, that is, the empirical distribution of the covariate X in the training samples; This indicates that under the empirical distribution, for The expected value is calculated by weighting the propensity score across all training samples, and then adjusting the denominator.
[0098] In summary, the technical solutions of this disclosure have the following technical advantages and system advancements:
[0099] 1. Continuity and Differentiability Guarantee: Spline basis, stream transform, supernetwork modulation, and attention mechanism are all continuously differentiable designs, ensuring smooth ADRF throughout the process;
[0100] 2. High expressiveness and interpretability are equally important: Transformer and multi-head attention endow the model with high-order interaction and conditional selection capabilities, while flow density and supernetworks ensure flexible fitting to processing distribution and effect function;
[0101] 3. Anti-confusion and Adaptive: Covariate confusion is eliminated by estimating the conditional distribution through a reversible flow network. By dynamically generating the network parameters of each layer in the main network, the model can be dynamically adjusted according to the processing level, thereby enhancing the adaptive capability to different delivery strategies.
[0102] 4. End-to-end integration: The various parts of the prediction network represent z by sharing covariates. x It is tightly coupled with the processing basis function φ(T) to achieve joint training.
[0103] In one embodiment, the method of this disclosure further includes: in a randomized controlled trial, calculating the effect of the intervention based on the increment of the continuous intervention effect under the current treatment and the cumulative increment, wherein the cumulative increment represents the incremental change caused by the accumulation of time.
[0104] Specifically, randomized controlled trials (RCTs) have long been widely used as the gold standard for causal inference. In this embodiment, it is assumed that the intervention is a selected intervention (ignoring the effects of the actual intervention). Therefore, in the case of a group of interventions, the combined effect of the interventions is the actual gain of group B. To further improve it, this embodiment proposes an additive effect combined intervention causal effect, which is close to the actual gain.
[0105] Specifically, in online A / B testing, the impact of an intervention is not a single event (one day), but a continuous process, primarily due to differences in the population distribution characteristics of the experimental and control groups. Traditional methods only consider the incremental Δ from this single intervention, neglecting the cumulative change over time. Therefore, calculating ΔLT... 30 As ground truth data, the exchange result needs to match the actual calculated result, which requires compensating for the incremental changes caused by the accumulation of time. The cumulative increment is the estimated LT of user A in the experimental group under the treatment of the control group. 30 Compared with the control group user B under the control group treatment, the predicted LT 30 The difference, that is:
[0106]
[0107] Overall ΔLT 30 for:
[0108]
[0109] After canceling out the identical parts in the middle, the result is as follows: User A in the experimental group, at d... 11 Celestial characteristics f 11 d 22 Day of intervention (treatment) T 22 The estimated LT 30 Compared to the control group user B, in d 11 Celestial Features intervention of the heavens The estimated LT 30 The difference:
[0110]
[0111] As shown above, we can conclude that ΔLT 30 It consists of two parts: one is the increment of causal effect under the current treatment, and the other is the cumulative increment. The reason for the cumulative increment is that the characteristic distribution of the experimental group and the control group changes over time, as shown below:
[0112]
[0113] The cumulative increment can be divided into three types: the cumulative effect brought by the core indicator itself, the cumulative effect brought by additional core indicators, and the cumulative effect brought by other non-core indicators.
[0114] The incremental causal effect under each treatment can be calculated. If the cumulative incremental effect brought by the core indicator itself can be separated, the overall cumulative causal effect of this indicator can be calculated.
[0115] For example, let's define it as follows:
[0116] This indicates the causal effect of the number of clean searches (i.e., the number of searches) on the first day;
[0117] This indicates the causal effect of the duration of purity on the first day;
[0118] This indicates the causal effect of other non-core indicators on the first day;
[0119] ΔLT30 1 and A 1 -C 1 This represents the difference in the overall estimated LT30 between groups A and B on the first day.
[0120] This indicates the cumulative pure causal effect of search results from day 1 to day 2.
[0121] This indicates the cumulative pure causal effect of the first two days.
[0122] This indicates a cumulative pure causal effect of other non-core indicators being lower by 1-2 days;
[0123] This represents the cumulative value of Delta LT30 for days 1-2.
[0124] The calculation logic is as follows:
[0125] Assuming the experiment lasts for 3 days, and that the two core metrics of search frequency and duration are significant;
[0126] I. On the first day, there was no cumulative increase in any indicator, and the causal effect was:
[0127]
[0128] The causal effect of the non-core indicator is the overall prediction ΔLT of groups A and B on the first day. 30 Subtracting the causal effects of search frequency and duration, we get:
[0129]
[0130] II. On the second day:
[0131]
[0132] III. On the third day:
[0133]
[0134] Therefore, we can conclude that:
[0135] ΔLT30 1 =ΔS 1 +ΔD 1 +ΔO 1
[0136] ΔLT30 2 =ΔS 2 +ΔD 2 +ΔO 2
[0137] ΔLT30 3 =ΔS 3 +ΔD 3 +ΔO 3
[0138] avg(ΔLT30)=avg(ΔS i )+avg(ΔD i )+avg(ΔO i )
[0139] Among them, avg(ΔLT30) is calculated from the mean ΔLT by the model, which is consistent with the previous calculation logic, and avg(ΔS) is calculated from the mean ΔLT by the model. i This represents the cumulative effect of three days, expressed as:
[0140]
[0141] Where N represents the current DAU of the experimental group; LT exp1 LT represents the LT of the experimental group on that day; LT exp11 LT represents the counterfactual value of the experimental group on that day; the denominator 3 represents the number of experimental days.
[0142] Figure 2This is a schematic diagram of a training method for a predictive network of continuous intervention effects according to an embodiment of the present disclosure. This embodiment is applicable to training predictive networks that predict dependent variables under continuous interventions of covariates and treatment variables, and relates to the field of computer technology, particularly artificial intelligence, big data, and deep learning technologies. The method can be executed by a training device for a predictive network of continuous intervention effects, implemented in software and / or hardware, preferably configured in an electronic device, such as a computer or server.
[0143] The prediction network in this embodiment includes a covariate feature extraction module, a conditional density estimation module composed of a reversible flow network, a dynamic fully connected layer module, and a processing regressor module as the main network. Figure 2 As shown, the method specifically includes the following:
[0144] S201. Through the covariate feature extraction module, multi-head self-attention interaction is performed on the covariates to obtain the covariate embedding.
[0145] S202. The covariate embedding and the processing variable are input into the reversible flow network, wherein the reversible flow network is used to estimate the conditional distribution of the processing variable under the covariate condition. The conditional distribution is represented by the negative log-likelihood, which is calculated based on the flow density formula.
[0146] S203. Through the dynamic fully connected layer module, the processing variables are mapped to processing vectors through smooth basis functions. Based on the different processing variables in the processing vectors, the network parameters of each layer in the main network are generated.
[0147] S204. Input the covariate embedding and processing vector into the main network, whereby the main network is used to calculate the fusion features based on the network parameters of each layer according to the covariate embedding and processing vector, and output the prediction results according to the fusion features.
[0148] S205. Construct density estimation based on negative log-likelihood, and construct regression loss based on prediction results.
[0149] S206. Generate a joint loss based on the density estimation loss, regression loss, and the smoothness regularization term of the prediction result curve. Based on the joint loss, train the prediction network end-to-end.
[0150] The covariate feature extraction module stacks multiple self-attention layers, each with multiple parallel attention heads. The training data includes covariates and processing variables. Covariates may include user profiles or behavioral sequences, while processing variables may include exposure frequency or discount intensity. In implementation, the covariates are input into the covariate feature extraction module, where multi-head self-attention interactions are performed to obtain the covariate embeddings.
[0151] Then, the covariate embedding and processing variables are input into the conditional density estimation module to form the inverse flow network. The inverse flow network consists of multiple coupled layers. Each coupled layer divides the processing variable into a first component and a second component. The first component remains unchanged, while the second component undergoes an affine transformation under the conditions of the first component and the covariate embedding. The inverse flow network achieves high-degree-of-freedom, low-bias density fitting for continuous processing.
[0152] Next, the processing variables are mapped to processing vectors using smoothing basis functions, and these processing vectors are then input into the dynamic fully connected layer module. The dynamic fully connected layer module generates the network parameters for each layer in the main network based on the different processing variables in the processing vectors. This dynamic fully connected layer module can consist of a supernetwork or feature-level linear modulation layers.
[0153] Then, the covariate embedding and processing vectors are input into the main network, which is used to calculate the fusion features based on the network parameters of each layer according to the covariate embedding and processing vectors, and output the prediction results based on the fusion features.
[0154] The main network consists of a multi-head self-attention layer and a feedforward network. The multi-head self-attention layer is used to perform multi-head self-attention calculation based on the covariate embeddings and processing vectors, and obtains fused features based on the network parameters of each layer. The feedforward network is used to output the prediction result based on the fused features. Moreover, during the calculation process of the multi-head self-attention layer, the Query is a linear mapping of the processing vector, and both the Key and Value are covariate embeddings.
[0155] Finally, a density estimation loss is constructed based on the negative log-likelihood, and a regression loss is constructed based on the prediction results. A joint loss is generated from the density estimation loss, regression loss, and the smoothness regularization term of the prediction curve. The prediction network is then trained end-to-end based on this joint loss. The joint loss can be expressed as:
[0156]
[0157] Reg represents the smoothness regularization term for the predicted curve, including weight decay and basis function smoothing penalty term, to enhance the smoothness of ADRF.
[0158] In causal inference, the dependency between treatment variables and covariates is the root cause of confounding bias. The present invention, through an invertible flow network, precisely quantifies this dependency when estimating the conditional distribution p(T|X). In this embodiment, the negative log-likelihood is calculated based on the flow density formula. The conditional distribution is represented by the negative log-likelihood. During training, a density estimation loss is constructed based on the negative log-likelihood and used as part of the joint loss for end-to-end training. This allows the trained network to eliminate the confounding effect of covariates when estimating continuous intervention effects, thereby accurately identifying the causal effect of the treatment variable. Furthermore, the use of an invertible flow network to estimate the conditional distribution achieves higher degrees of freedom and lower bias density fitting.
[0159] The predictive network structure of this disclosure consists of a covariate feature extraction module (High Level-Transformer), a conditional density estimation module (Normalizing Flow), a dynamic fully connected layer module (Hypernetworks / FiLM weight modulation), and a processing regressor module (multi-head attention conditional selection). The technical solution of this disclosure integrates information about the processing quantity t into the network parameters, thereby simultaneously emphasizing the impact of t on the output and maintaining the continuity of the output, overcoming the shortcomings of existing discretized networks. Furthermore, the overall end-to-end process reveals the diverse application scenarios of this solution.
[0160] Therefore, the technical solution disclosed herein includes steps such as data collection, model training, ADRF curve prediction, and optimal decision-making based on the curve. It can be widely applied in fields requiring continuous treatment effect estimation, such as e-commerce advertising optimization, precision marketing, and medical drug dosage optimization. Taking advertising optimization as an example, this disclosure provides the following application solutions for practical deployment:
[0161] 1. Data Preprocessing: A standardized pipeline is used to clean, normalize, and impute missing values for user-ad interaction features; the training / validation set is split by time to simulate online real-time prediction scenarios; user-ad interaction features include data such as impressions, clicks, add-to-cart, and conversions.
[0162] 2. Model Training: A phased training strategy is adopted. First, the covariate feature extraction module is pre-trained. Then, the reversible flow network and the super network / FiLM dynamic module are jointly optimized. Finally, the network is fine-tuned through end-to-end training.
[0163] 3. Online Deployment: Embed the publicly disclosed predictive network TFHM (Transformer-driven Flow Hypernet Mixture) into the advertising strategy / user growth platform. When a new user request is triggered, the covariate X is read from the log system in real time, such as the user's age, gender, historical click records, or browsing duration. Then, candidate processing level sequences T (i.e., processing variables) are formulated, such as recommendation frequency, delivery time, or delivery method. Next, the obtained covariate X and processing variable T are input into TFHM to calculate the ADRF curve, and the recommendation frequency is output according to the optimal goal (such as maximum conversion rate or long-term value).
[0164] Because the TFHM disclosed herein uses a High-Level Transformer covariate feature extraction module, it overcomes the collinearity problem of confounding variables and provides richer feature representations. It also employs continuous reversible flow estimation of high-dimensional processing density and combines a variable coefficient prediction head to maintain the smoothness and continuity of ADRF. Furthermore, it introduces a hypernetwork / FiLM to dynamically generate network weights and automatically adjusts parameters for different processing. Finally, it integrates Transformer multi-head attention in the regressor to conditionally select covariates, improving explanatory power and expressiveness. This makes the technical solution of this disclosure for predicting continuous intervention effects meet the key requirements of high expressiveness, ADRF continuity, anti-collinearity, and interpretability, thereby making the prediction results more accurate. In fields that require continuous treatment effect estimation, such as e-commerce advertising optimization, precision marketing, and medical drug dosage optimization, it provides accurate and interpretable causal estimates of continuous intervention effects as a basis for resource optimization and decision support.
[0165] Figure 3 This is a schematic diagram of another method for predicting the continuous intervention effect according to an embodiment of this disclosure. The method is used in a prediction network, which includes a covariate feature extraction module, a conditional density estimation module composed of a reversible flow network, a dynamic fully connected layer module, and a processing regressor module as the main network. Figure 3 As shown, the method includes:
[0166] S301. Through the covariate feature extraction module, multi-head self-attention interaction is performed on the covariates to obtain the covariate embedding.
[0167] S302. Through the dynamic fully connected layer module, the processing variables are mapped to processing vectors through smooth basis functions. Based on the different processing variables in the processing vectors, the network parameters of each layer in the main network are generated.
[0168] S303. Input the covariate embedding and processing vector into the main network, whereby the main network is used to calculate the fusion features based on the network parameters of each layer according to the covariate embedding and processing vector, and output the prediction results according to the fusion features.
[0169] Among them, the reversible flow network is used to estimate the conditional distribution of the treatment variable under covariate conditions. The conditional distribution is represented by the negative log-likelihood, which is calculated based on the flow density formula.
[0170] The prediction network is trained end-to-end based on the joint loss, which includes density estimation loss, regression loss, and prediction curve smoothness regularization term. The density estimation loss is constructed based on negative log-likelihood, and the regression loss is constructed based on the prediction results.
[0171] The covariate feature extraction module stacks multiple self-attention layers, each with multiple parallel attention heads. The reversible flow network consists of multiple coupled layers, each dividing the processed variable into a first component and a second component. The first component remains unchanged, while the second component undergoes an affine transformation based on the first component and the covariate embedding. The dynamic fully connected layer module consists of a supernetwork or a feature-level linear modulation layer. The main network consists of a multi-head self-attention layer and a feedforward network. The multi-head self-attention layer performs multi-head self-attention calculation based on the covariate embedding and the processed vector, using the network parameters of each layer to obtain fused features. The feedforward network outputs the prediction result based on the fused features. During the calculation process in the multi-head self-attention layer, Query is a linear mapping of the processed vector, and Key and Value are both covariate embeddings.
[0172] Specifically, the prediction network is trained using the same training method disclosed herein. In this embodiment, when predicting the continuous intervention effect based on the trained prediction network, the covariate embedding is first extracted, and then the processing variables are mapped to processing vectors through a smoothing basis function via a dynamic fully connected layer module. Based on the different processing variables in the processing vectors, the network parameters of each layer in the main network are generated. Then, the covariate embedding and processing vectors are input into the main network to obtain the final prediction result.
[0173] In this embodiment of the present disclosure, the negative log-likelihood is calculated based on the flow density formula. The conditional distribution is represented by the negative log-likelihood. During training, the density estimation loss is constructed based on the negative log-likelihood and used as part of the joint loss for end-to-end training. This allows the trained prediction network to eliminate the confounding effect of covariates when estimating the continuous intervention effect, thereby accurately identifying the causal effect of the treatment variable.
[0174] Figure 4This is a diagram of the prediction network architecture according to an embodiment of the present disclosure. The diagram shows the overall structure of the prediction network TFHM (Transformer-driven Flow Hypernet Mixture) of the present disclosure. The inputs are covariate features X and continuous processing variables T. First, the covariate X is processed through multiple High Level-Transformer modules to extract a deep embedding representation z. x This effectively captures the interactions between higher-order fields. The processing variable T is simultaneously mapped to the basis function expansion representation φ(T). The structure contains three main information paths: firstly, z... x First, along with T, a reversible flow density estimation network is input to learn the conditional distribution p(T|X), providing a basis for subsequent de-obfuscation. Second, φ(T) generates the main network parameters through a supernetwork or FiLM module, achieving dynamic response for different processing levels. Third, z x The conditional feature selection at the individual level is achieved by fusing φ(T) with a multi-head attention mechanism, and the resulting causal response estimate μ(T,X) is output via a feedforward regressor. Finally, the outputs of all paths are trained collaboratively in a joint loss module. The loss function consists of a causal prediction error term, a negative log-likelihood term for processing density, and an ADRF curve smoothness regularization term, ensuring that the model balances prediction accuracy, structural smoothness, and robustness in continuous intervention scenarios. This network structure effectively achieves dynamic modeling of processing variables and conditional feature selection of covariates, possessing high interpretability and strong generalization ability, making it suitable for refined delivery and user response modeling tasks.
[0175] Figure 5 This is a flowchart illustrating the overall prediction process according to embodiments of this disclosure. The flowchart shows the overall flow of the technical solution from input to output. First, user characteristics and corresponding continuous treatment data (i.e., intervention variables T, such as search count and feed duration) are collected and input into the trained prediction network TFHM for prediction. The model outputs a unified evaluation score (e.g., counterfactual LT user value under varying T). Finally, in practical applications, this score can be used for cross-indicator resource optimization or decision support, such as optimizing advertising strategies or drug dosage allocation. The above flow of this disclosure highlights a closed-loop process from feature input to final decision support.
[0176] In summary, the industry currently offers some products and solutions for causal effect estimation and optimization. For example, large domestic and international internet companies use causal inference technology in their advertising and recommendation systems to improve conversion rates; advertising technology platforms also provide personalized delivery services. These systems often use traditional A / B testing or discrete machine learning methods for optimization, which have limited capabilities when handling continuous delivery intensities. In the medical field, some companies have developed tools for personalized diagnosis and treatment and dosing protocols, but most focus on statistical analysis and expert rules, lacking continuous dose optimization models based on deep neural network learning. Overall, there is currently no publicly available commercial system that can specifically perform end-to-end causal effect learning for continuous interventions and output smooth ADRF curves.
[0177] The technical solution of this disclosure can overcome the defects of the prior art and has the following technical effects:
[0178] 1. Using the High-Level Transformer covariate feature extraction module, the problem of collinearity of confounding variables is overcome, while providing richer feature representation;
[0179] 2. A continuous reversible flow estimation method is used to estimate the high-dimensional processing density, and a variable coefficient prediction head is combined to maintain the smoothness and continuity of the ADRF.
[0180] 3. Introduce hypernetwork / FiLM to dynamically generate network weights and automatically adjust parameters for different processing methods;
[0181] 4. Integrating Transformer multi-head attention into the regressor to conditionally select covariates improves explanatory and expressive power;
[0182] 5. Applying continuous causal inference to RCT experiments, TFHM and RCT complement each other, providing dual assurance for downstream tasks.
[0183] Therefore, the prediction network of this disclosure embodiment is efficient, interpretable, and continuous.
[0184] Figure 6 This is a schematic diagram of a device for predicting continuous intervention effects according to an embodiment of the present disclosure. This embodiment is applicable to predicting the dependent variable under continuous intervention of covariates and treatment variables, i.e., predicting ADRF curves. It relates to the field of computer technology, and particularly to artificial intelligence, big data, and deep learning technologies. This device can implement the method for predicting continuous intervention effects described in any embodiment of the present disclosure. Figure 6 As shown, the device 600 specifically includes:
[0185] The covariate embedding acquisition module 610 is used to perform multi-head self-attention interaction on the covariates to obtain the covariate embeddings;
[0186] The first input module 620 is used to input the covariate embedding and processing variables into the reversible flow network, wherein the reversible flow network is used to estimate the conditional distribution of the processing variables under the covariate conditions;
[0187] The network parameter generation module 630 is used to map the processing variables into processing vectors through smoothing basis functions, and generate network parameters for each layer in the main network according to the different processing variables in the processing vectors.
[0188] The second input module 640 is used to input the covariate embedding and the processing vector into the main network, wherein the main network is used to calculate the fusion feature based on the network parameters of each layer according to the covariate embedding and the processing vector, and output the initial prediction result according to the fusion feature;
[0189] The target prediction result calculation module 650 is used to perform weighted calculation on the initial prediction result using the conditional distribution to obtain the target prediction result of the dependent variable under the continuous intervention of the covariate and the treatment variable.
[0190] Optionally, the covariate embedding acquisition module 610 includes:
[0191] An input sequence generation unit is used to map fields in the covariates to a multidimensional dense vector and generate an input sequence based on the multidimensional dense vector.
[0192] An attention interaction unit is used to perform multi-level self-attention interaction on the input sequence in a network with multiple stacked self-attention layers, wherein each self-attention layer is constructed with multiple parallel attention heads.
[0193] The splicing and transformation unit is used to splice and transform the outputs of the multiple parallel attention heads to obtain the covariate embedding.
[0194] Optionally, the conditional distribution is represented by a negative log-likelihood, which is calculated based on the flux density formula.
[0195] Optionally, the reversible flow network consists of multiple coupling layers, each of which divides the processing variable into a first component and a second component. The first component remains unchanged, and the second component undergoes an affine transformation under the conditions of the first component and the covariate embedding.
[0196] Optionally, the network parameter generation module 630 includes:
[0197] The first generation submodule is used to input the processing vector into the supernetwork, wherein the supernetwork is used to output the network parameters of each layer in the main network, and the network parameters include weight parameters and biases.
[0198] Optionally, the network parameter generation module 630 includes:
[0199] The second generation submodule is used to input the processing vector into the feature-level linear modulation layer, wherein the feature-level linear modulation layer is used to generate the scaling and offset of the intermediate features of each layer in the main network, so as to perform an affine transformation on the intermediate features according to the scaling and the offset, while the weights in the main network remain unchanged.
[0200] Optionally, the main network consists of a multi-head self-attention layer and a feedforward network;
[0201] The multi-head self-attention layer is used to perform multi-head self-attention calculation based on the network parameters of each layer according to the covariate embedding and the processing vector to obtain the fusion feature, and the feedforward network is used to output the initial prediction result according to the fusion feature.
[0202] Optionally, during the computation process of the multi-head self-attention layer, Query is a linear mapping of the processing vector, and Key and Value are both covariate embeddings.
[0203] Optionally, the device further includes:
[0204] The randomized controlled trial module is used to calculate the effect of an intervention in a randomized controlled trial based on the increment of the continuous intervention effect under the current treatment and the cumulative increment, wherein the cumulative increment represents the incremental change caused by the accumulation of time.
[0205] Figure 7 This is a schematic diagram of a training apparatus for a predictive network of continuous intervention effects according to an embodiment of the present disclosure. This apparatus can implement the training method for a predictive network of continuous intervention effects described in any embodiment of the present disclosure. The predictive network includes a covariate feature extraction module, a conditional density estimation module composed of a reversible flow network, a dynamic fully connected layer module, and a processing regressor module as the main network. Figure 7 As shown, the device 700 specifically includes:
[0206] The covariate embedding acquisition unit 710 is used to perform multi-head self-attention interaction on the covariate through the covariate feature extraction module to obtain the covariate embedding;
[0207] The first input unit 720 is used to input the covariate embedding and processing variables into the reversible flow network, wherein the reversible flow network is used to estimate the conditional distribution of the processing variables under the covariate conditions, the conditional distribution being represented by negative log-likelihood, the negative log-likelihood being calculated based on the flow density formula;
[0208] The network parameter generation unit 730 is used to map the processing variables into processing vectors through the smooth basis function via the dynamic fully connected layer module, and generate network parameters for each layer in the main network based on the different processing variables in the processing vectors.
[0209] The second input unit 740 is used to input the covariate embedding and the processing vector into the main network, wherein the main network is used to calculate the fusion feature based on the network parameters of each layer according to the covariate embedding and the processing vector, and output the prediction result according to the fusion feature;
[0210] Loss construction unit 750 is used to estimate loss based on the negative log-likelihood density and construct regression loss based on the prediction results;
[0211] Training unit 760 is used to generate a joint loss based on the density estimation loss, the regression loss, and the prediction result curve smoothness regularization term, and to train the prediction network end-to-end based on the joint loss.
[0212] Optionally, the covariate feature extraction module stacks multiple self-attention layers, and each self-attention layer constructs multiple parallel attention heads.
[0213] Optionally, the reversible flow network consists of multiple coupling layers, each of which divides the processing variable into a first component and a second component. The first component remains unchanged, and the second component undergoes an affine transformation under the conditions of the first component and the covariate embedding.
[0214] Optionally, the dynamic fully connected layer module is composed of a supernetwork or a feature-level linear modulation layer.
[0215] Optionally, the main network consists of a multi-head self-attention layer and a feedforward network;
[0216] The multi-head self-attention layer is used to perform multi-head self-attention calculation based on the network parameters of each layer according to the covariate embedding and the processing vector to obtain the fusion feature, and the feedforward network is used to output the prediction result according to the fusion feature.
[0217] Optionally, during the computation process in the multi-head self-attention layer, Query is a linear mapping of the processing vector, and Key and Value are both covariate embeddings.
[0218] Figure 8 This is a schematic diagram of another device for predicting the continuous intervention effect according to an embodiment of this disclosure. The device is used for a prediction network, which includes a covariate feature extraction module, a conditional density estimation module composed of a reversible flow network, a dynamic fully connected layer module, and a processing regressor module as the main network. Figure 8 As shown, the device 800 specifically includes:
[0219] Extraction unit 810 is used to perform multi-head self-attention interaction on the covariate through the covariate feature extraction module to obtain the covariate embedding;
[0220] The generation unit 820 is used to map the processing variables into processing vectors through the smoothing basis function via the dynamic fully connected layer module, and generate network parameters for each layer in the main network according to the different processing variables in the processing vectors.
[0221] The main network processing unit 830 is used to input the covariate embedding and the processing vector into the main network, wherein the main network is used to calculate the fusion feature based on the network parameters of each layer according to the covariate embedding and the processing vector, and output the initial prediction result according to the fusion feature;
[0222] The reversible flow network is used to estimate the conditional distribution of the processing variable under the covariate condition, wherein the conditional distribution is represented by the negative log-likelihood, which is calculated based on the flow density formula.
[0223] The prediction network is trained end-to-end based on a joint loss, which includes a density estimation loss, a regression loss, and a prediction result curve smoothness regularization term. The density estimation loss is constructed based on the negative log-likelihood, and the regression loss is constructed based on the prediction result.
[0224] The above-described products can perform the methods provided in any embodiment of this disclosure, and have the corresponding functional modules and beneficial effects for performing the methods.
[0225] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0226] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0227] Figure 9A schematic block diagram of an example electronic device 900 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0228] like Figure 9 As shown, device 900 includes a computing unit 901, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 902 or a computer program loaded from storage unit 908 into random access memory (RAM) 903. RAM 903 may also store various programs and data required for the operation of device 900. The computing unit 901, ROM 902, and RAM 903 are interconnected via bus 904. Input / output (I / O) interface 905 is also connected to bus 904.
[0229] Multiple components in device 900 are connected to I / O interface 905, including: input unit 906, such as keyboard, mouse, etc.; output unit 907, such as various types of monitors, speakers, etc.; storage unit 908, such as disk, optical disk, etc.; and communication unit 909, such as network card, modem, wireless transceiver, etc. Communication unit 909 allows device 900 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0230] The computing unit 901 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as methods for predicting successive intervention effects. For example, in some embodiments, the methods for predicting successive intervention effects can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program can be loaded and / or installed on device 900 via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by the computing unit 901, one or more steps of the methods for predicting successive intervention effects described above can be performed. Alternatively, in other embodiments, the computing unit 901 can be configured to perform methods for predicting successive intervention effects by any other suitable means (e.g., by means of firmware).
[0231] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0232] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0233] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0234] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0235] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0236] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is established by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service ecosystem that addresses the management difficulties and weak business scalability inherent in traditional physical hosting and VPS services. Servers can also be servers for distributed systems or servers integrated with blockchain technology.
[0237] Artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies mainly include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.
[0238] Cloud computing refers to a technology system that enables access to a shared pool of physical or virtual resources via a network. These resources can include servers, operating systems, networks, software, applications, and storage devices, and can be deployed and managed on demand and in a self-service manner. Cloud computing technology can provide efficient and powerful data processing capabilities for applications such as artificial intelligence and blockchain, as well as for model training.
[0239] Furthermore, according to embodiments of this disclosure, another electronic device, another readable storage medium, and another computer program product are also provided for performing one or more steps of the training method for a prediction network of consecutive intervention effects described in any embodiment of this disclosure. The specific structure and program code can be found as follows: Figure 9 The content of the illustrated embodiments will not be repeated here.
[0240] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution provided in this disclosure can be achieved, and this is not limited herein.
[0241] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for predicting the effects of continuous intervention, comprising: Multi-head self-attention interaction is performed on the covariates to obtain the covariate embeddings; The covariate embedding and processing variables are input into a reversible flow network, wherein the reversible flow network is used to estimate the conditional distribution of the processing variables under the covariate conditions; The processing variables are mapped to processing vectors using smoothing basis functions, and network parameters for each layer in the main network are generated based on the different processing variables in the processing vectors. The covariate embedding and the processing vector are input into the main network, wherein the main network is used to calculate the fusion feature based on the network parameters of each layer according to the covariate embedding and the processing vector, and output the initial prediction result according to the fusion feature; The initial prediction results are weighted using the conditional distribution to obtain the target prediction result of the dependent variable under the continuous intervention of the covariate and the treatment variable.
2. The method according to claim 1, wherein, The process of performing multi-head self-attention interaction on the covariates to obtain covariate embeddings includes: The fields in the covariates are mapped to a multidimensional dense vector, and an input sequence is generated based on the multidimensional dense vector; In a network with multiple stacked self-attention layers, the input sequence is subjected to multi-order self-attention interactions, wherein each self-attention layer is constructed with multiple parallel attention heads; The outputs of the multiple parallel attention heads are concatenated and transformed to obtain the covariate embedding.
3. The method according to claim 1, wherein, The conditional distribution is represented by the negative log-likelihood, which is calculated based on the flux density formula.
4. The method according to claim 1 or 3, wherein, The reversible flow network consists of multiple coupling layers. Each coupling layer divides the processing variable into a first component and a second component. The first component remains unchanged, and the second component undergoes an affine transformation under the conditions of the first component and the covariate embedding.
5. The method according to claim 1, wherein, The step of generating network parameters for each layer in the main network based on different processing variables in the processing vector includes: The processing vector is input into a super network, which is used to output the network parameters of each layer in the main network, including weight parameters and biases.
6. The method according to claim 1, wherein, The step of generating network parameters for each layer in the main network based on different processing variables in the processing vector includes: The processing vector is input into the feature-level linear modulation layer, wherein the feature-level linear modulation layer is used to generate the scaling and offset of the intermediate features of each layer in the main network, so as to perform an affine transformation on the intermediate features according to the scaling and the offset, while the weights in the main network remain unchanged.
7. The method according to claim 1, wherein, The main network consists of a multi-head self-attention layer and a feedforward network; The multi-head self-attention layer is used to perform multi-head self-attention calculation based on the network parameters of each layer according to the covariate embedding and the processing vector to obtain the fusion feature, and the feedforward network is used to output the initial prediction result according to the fusion feature.
8. The method according to claim 7, wherein, During the computation process of the multi-head self-attention layer, Query is a linear mapping of the processing vector, and Key and Value are both covariate embeddings.
9. The method according to claim 1, further comprising: In randomized controlled trials, the effect of the intervention is calculated based on the increment of the continuous intervention effect under the current treatment and the cumulative increment, wherein the cumulative increment represents the incremental change caused by the accumulation of time.
10. A training method for a predictive network of continuous intervention effects, wherein, The prediction network includes a covariate feature extraction module, a conditional density estimation module composed of a reversible flow network, a dynamic fully connected layer module, and a processing regressor module as the main network. The method includes: The covariate feature extraction module performs multi-head self-attention interaction on the covariates to obtain the covariate embeddings. The covariate embedding and processing variables are input into the reversible flow network, wherein the reversible flow network is used to estimate the conditional distribution of the processing variables under the covariate conditions, the conditional distribution being represented by negative log-likelihood, which is calculated based on the flow density formula; Through the dynamic fully connected layer module, the processing variables are mapped to processing vectors through smooth basis functions, and the network parameters of each layer in the main network are generated according to the different processing variables in the processing vectors. The covariate embedding and the processing vector are input into the main network, wherein the main network is used to calculate the fusion features based on the network parameters of each layer according to the covariate embedding and the processing vector, and output the prediction results according to the fusion features; The density estimate loss is constructed based on the negative log-likelihood, and the regression loss is constructed based on the prediction results. A joint loss is generated based on the density estimation loss, the regression loss, and the smoothness regularization term of the prediction result curve. The prediction network is then trained end-to-end based on the joint loss.
11. The method according to claim 10, wherein, The covariate feature extraction module stacks multiple self-attention layers, and each self-attention layer constructs multiple parallel attention heads.
12. The method according to claim 10, wherein, The reversible flow network consists of multiple coupling layers. Each coupling layer divides the processing variable into a first component and a second component. The first component remains unchanged, and the second component undergoes an affine transformation under the conditions of the first component and the covariate embedding.
13. The method according to claim 10, wherein, The dynamic fully connected layer module consists of a supernetwork or a feature-level linear modulation layer.
14. The method of claim 10, wherein, The main network consists of a multi-head self-attention layer and a feedforward network; The multi-head self-attention layer is used to perform multi-head self-attention calculation based on the network parameters of each layer according to the covariate embedding and the processing vector to obtain the fusion feature, and the feedforward network is used to output the prediction result according to the fusion feature.
15. The method according to claim 14, wherein, During the computation process of the multi-head self-attention layer, Query is a linear mapping of the processing vector, and Key and Value are both covariate embeddings.
16. A method for predicting the effects of continuous interventions, used in a prediction network, said prediction network comprising a covariate feature extraction module, a conditional density estimation module composed of a reversible flow network, a dynamic fully connected layer module, and a processing regressor module as the main network, wherein, The method includes: The covariate feature extraction module performs multi-head self-attention interaction on the covariates to obtain the covariate embeddings. Through the dynamic fully connected layer module, the processing variables are mapped to processing vectors through smooth basis functions, and the network parameters of each layer in the main network are generated according to the different processing variables in the processing vectors. The covariate embedding and the processing vector are input into the main network, wherein the main network is used to calculate the fusion features based on the network parameters of each layer according to the covariate embedding and the processing vector, and output the prediction results according to the fusion features; The reversible flow network is used to estimate the conditional distribution of the processing variable under the covariate condition, wherein the conditional distribution is represented by the negative log-likelihood, which is calculated based on the flow density formula. The prediction network is trained end-to-end based on a joint loss, which includes a density estimation loss, a regression loss, and a prediction result curve smoothness regularization term. The density estimation loss is constructed based on the negative log-likelihood, and the regression loss is constructed based on the prediction result.
17. A device for predicting the effects of continuous interventions, comprising: The covariate embedding acquisition module is used to perform multi-head self-attention interaction on covariates to obtain covariate embeddings; The first input module is used to input the covariate embedding and processing variables into the reversible flow network, wherein the reversible flow network is used to estimate the conditional distribution of the processing variables under the covariate conditions; The network parameter generation module is used to map the processing variables into processing vectors through smoothing basis functions, and generate network parameters for each layer in the main network based on the different processing variables in the processing vectors. The second input module is used to input the covariate embedding and the processing vector into the main network, wherein the main network is used to calculate the fusion feature based on the network parameters of each layer according to the covariate embedding and the processing vector, and output the initial prediction result according to the fusion feature; The target prediction result calculation module is used to perform weighted calculation on the initial prediction result using the conditional distribution to obtain the target prediction result of the dependent variable under the continuous intervention of the covariate and the treatment variable.
18. A training device for a predictive network of continuous intervention effects, wherein, The prediction network includes a covariate feature extraction module, a conditional density estimation module composed of a reversible flow network, a dynamic fully connected layer module, and a processing regressor module as the main network. The device includes: The covariate embedding acquisition unit is used to perform multi-head self-attention interaction on the covariate through the covariate feature extraction module to obtain the covariate embedding; The first input unit is used to input the covariate embedding and processing variables into the reversible flow network, wherein the reversible flow network is used to estimate the conditional distribution of the processing variables under the covariate conditions, the conditional distribution being represented by negative log-likelihood, the negative log-likelihood being calculated based on the flow density formula; The network parameter generation unit is used to map the processing variables into processing vectors through the smoothing basis function via the dynamic fully connected layer module, and generate network parameters for each layer in the main network based on the different processing variables in the processing vectors. The second input unit is used to input the covariate embedding and the processing vector into the main network, wherein the main network is used to calculate the fusion feature based on the network parameters of each layer according to the covariate embedding and the processing vector, and output the prediction result according to the fusion feature; A loss construction unit is used to construct a density estimate based on the negative log-likelihood and to construct a regression loss based on the prediction results. The training unit is used to generate a joint loss based on the density estimation loss, the regression loss, and the prediction result curve smoothness regularization term, and to train the prediction network end-to-end based on the joint loss.
19. A predictive device for continuous intervention effects, used in a prediction network, said prediction network comprising a covariate feature extraction module, a conditional density estimation module composed of a reversible flow network, a dynamic fully connected layer module, and a processing regressor module as the main network, wherein, The device includes: The extraction unit is used to perform multi-head self-attention interaction on the covariates through the covariate feature extraction module to obtain the covariate embedding; The generation unit is used to map the processing variables into processing vectors through the smoothing basis function using the dynamic fully connected layer module, and generate network parameters for each layer in the main network based on the different processing variables in the processing vectors. The main network processing unit is used to input the covariate embedding and the processing vector into the main network, wherein the main network is used to calculate the fusion feature based on the network parameters of each layer according to the covariate embedding and the processing vector, and output the prediction result according to the fusion feature; The reversible flow network is used to estimate the conditional distribution of the processing variable under the covariate condition, wherein the conditional distribution is represented by the negative log-likelihood, which is calculated based on the flow density formula. The prediction network is trained end-to-end based on a joint loss, which includes a density estimation loss, a regression loss, and a prediction result curve smoothness regularization term. The density estimation loss is constructed based on the negative log-likelihood, and the regression loss is constructed based on the prediction result.
20. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method for predicting the continuous intervention effect according to any one of claims 1-9 and claim 16, and the method for training the predictive network for the continuous intervention effect according to any one of claims 10-15.
21. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the prediction method for continuous intervention effects according to any one of claims 1-9 and claim 16, and the training method for the prediction network for continuous intervention effects according to any one of claims 10-15.
22. A computer program product comprising a computer program that, when executed by a processor, implements the method for predicting the continuous intervention effect according to any one of claims 1-9 and claim 16, and the method for training the predictive network for the continuous intervention effect according to any one of claims 10-15.
