Optimization method for gain model and time sequence prediction model
By training a gain model and introducing an auxiliary loss function to optimize ranking capabilities, the problem of inaccurate ranking by the gain model is solved, and accurate assessment and ranking of individual response differences are achieved.
Patent Information
- Application Number
- CN202510987686.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-16
- Publication Date
- 2025-11-07
AI Technical Summary
Existing gain models cannot accurately assess the differences in individual responses to interventions, resulting in insufficient ranking capabilities. Traditional assessment methods are biased, leading to incorrect rankings.
By acquiring a dataset, training a gain model, introducing an auxiliary loss function to optimize the model, ensuring that the conditional average causal effect of persuasive individuals is greater than that of unpersuasive individuals, and redefining the principle gain curve to ensure that persuasive individuals are ranked ahead of unpersuasive individuals.
It significantly improves the ranking accuracy of the gain model, avoids the biases brought about by traditional evaluation methods, and enhances the model's ability to accurately assess individual response differences.
Smart Images

Figure CN120911531A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The embodiment of the present specification belongs to the field of artificial intelligence, and particularly relates to an optimization method for a gain model. BACKGROUND
[0002] Uplift modeling is a tool for identifying the difference in response of individuals to a specific intervention (such as a product promotion strategy), and is widely used in application scenarios of personalized decision-making. The core goal of the uplift model is to estimate the CATE (Conditional Average Treatment Effect) of the results generated by the intervention measures on individuals, to quantify the difference in results generated by different individuals under the conditions of intervention and non-intervention, and to sort all individuals based on the estimated CATE value, which can help decision makers to prioritize individuals who are most sensitive to intervention measures.
[0003] For example, in the field of product marketing, the CATE of the product promotion strategy for the product is estimated by the uplift model, relative to whether the user has the purchase intention of the product, and all products are sorted based on the CATE of the product, so that those products that respond positively to the product promotion strategy can be identified, and unnecessary resource investment for those products that are not sensitive to product promotion can be avoided.
[0004] However, since the CATE value is usually counterfactual quantity, it cannot be directly observed in general; for example, only the results generated by the preset processing on an individual can be observed, but the results generated by not performing the preset processing on the individual cannot be observed at the same time; therefore, this may result in that the uplift model cannot accurately sort individuals in the target individual group according to the CATE value. Moreover, the traditional evaluation method is also difficult to accurately evaluate the sorting ability of the uplift model. SUMMARY
[0005] The present specification proposes an optimization method for a gain model, the method comprising:
[0006] obtaining a data set for training the gain model; wherein the data samples in the data set contain a covariate, a binary processing variable and a binary result variable; the covariate is used to represent the individual characteristics of an individual; the binary processing variable represents whether a preset processing is performed on the individual; and the binary result variable represents whether a preset result is generated in the case of performing the preset processing on the individual or not performing the preset processing on the individual;
[0007] inputting a data sample in the data set into the gain model to perform, by the gain model, a training calculation corresponding to a task target of the gain model for the data sample; wherein the training calculation comprises estimating, based on the data sample, a conditional average causal effect of a preset processing performed on the individual relative to the preset result, and ranking the individuals in the data set according to values of the estimated conditional average causal effect in descending order;
[0008] calculating a model loss generated by training of the gain model; wherein the model loss comprises a basic model loss calculated based on a result of the training calculation output by the gain model, and an auxiliary loss for guiding the gain model to estimate a conditional average causal effect greater for a persuadable individual than for a non-persuadable individual; the persuadable individual comprises an individual who produces the preset result in the case of performing the preset processing, and an individual who does not produce the preset result in the case of not performing the preset processing; the non-persuadable individual comprises an individual who produces the preset result in the case of not performing the preset processing, and an individual who does not produce the preset result in the case of performing the preset processing;
[0009] adjusting a model parameter of the gain model based on the calculated model loss to complete the training of the gain model.
[0010] Optionally, an evaluation index corresponding to the gain model comprises a principle gain curve; the auxiliary loss comprises a principle gain loss corresponding to the principle gain curve; the principle gain curve is used to evaluate an accuracy of ranking of the individuals in the data set by the gain model;
[0011] wherein the principle gain curve is a gain curve constructed based on a ranking rule of maximizing a curve value of the principle gain curve; the ranking rule comprises setting the same ranking weight for the persuadable individual and the non-persuadable individual; and ranking the persuadable individual before the non-persuadable individual;
[0012] Correspondingly, the persuadable individual and the non-persuadable individual have the same calculation weight in a curve function corresponding to the principle gain curve; and the curve value calculated based on the principle gain curve reaches a maximum in the case of ranking the persuadable individual before the non-persuadable individual;
[0013] wherein the curve value is used to quantify an accuracy degree of ranking of the individuals in the data set by the gain model; the curve value is positively correlated with the accuracy degree.
[0014] Optionally, the curve function corresponding to the principle gain curve is represented by the following formula:
[0015]
[0016] wherein S represents a sequence of individuals obtained by sorting individuals in the data set according to the estimated conditional average causal effect from large to small; D represents the data set; V(k, S) represents a curve value; represents the number of individuals with T=1 and Y=1 in the first k individuals in the individual sequence; represents the number of individuals with T=0 and Y=0 in the first k individuals in the individual sequence; represents the number of individuals with T=0 and Y=1 in the first k individuals in the individual sequence; represents the number of individuals with T=1 and Y=0 in the first k individuals in the individual sequence; T=1 represents that the individual is subjected to the preset processing; T=0 represents that the individual is not subjected to the preset processing; Y=1 represents that the preset result is generated; Y=0 represents that the preset result is not generated.
[0017] Optionally, the gain model is a gain model with a multi-task objective; wherein the task objectives of the gain model include: a first prediction task of learning a feature representation corresponding to the individual from the individual features contained in the data sample, and further predicting a binary prediction result of whether the preset result is generated in the case of subjecting the individual to the preset processing and not subjecting the individual to the preset processing based on the feature representation.
[0018] The gain model estimates the conditional average causal effect of the individual based on the data sample, including:
[0019] The gain model learns a feature representation corresponding to the individual from the individual features contained in the data sample;
[0020] Based on the learned feature representation, a first prediction result is obtained by predicting whether the preset result is generated in the case of subjecting the individual to the preset processing, and a second prediction result is obtained by predicting whether the preset result is generated in the case of not subjecting the individual to the preset processing based on the learned feature representation;
[0021] Based on the first prediction result and the second prediction result, a conditional average causal effect of the preset processing on the preset result is further estimated, to obtain a value of the conditional average causal effect corresponding to the individual.
[0022] Optionally, the base model loss includes a prediction loss corresponding to the first prediction task;
[0023] The prediction loss is represented by a binary cross-entropy loss between an actual value of the binary outcome variable contained in the data sample and a result value of a binary prediction result of whether the preset outcome is generated.
[0024] Optionally, the task target of the gain model further includes a guidance task of generating a guidance value for the individual based on a preset guidance function, wherein the guidance value is used to guide the gain model to estimate a conditional average causal effect close to the guidance value for the individual.
[0025] The gain model performs a training calculation corresponding to the task target of the gain model for the data sample, and further includes:
[0026] determining a type of the individual corresponding to the data sample;
[0027] if the individual is the persuadable individual, generating a first guidance value for the individual based on a preset guidance function;
[0028] if the individual is the non-persuadable individual, generating a second guidance value for the individual based on a preset guidance function;
[0029] wherein the first guidance value is greater than the second guidance value.
[0030] Optionally, the guidance function is a binary classification function; the guidance task includes a task of classifying individuals in the data set based on a preset binary classification function; wherein a classification label of the binary classification includes a first classification label used to indicate that the individual is a persuadable individual, and a second classification label used to indicate that the individual is a non-persuadable individual; the first classification label is represented by the first guidance value; and the second classification label is represented by the second guidance value.
[0031] determining a type of the individual corresponding to the data sample includes:
[0032] classifying the individual corresponding to the data sample;
[0033] if the individual is the persuadable individual, assigning the first guidance value to the individual as the first classification label;
[0034] if the individual is the non-persuadable individual, assigning the second guidance value to the individual as the second classification label.
[0035] Optionally, the optimization objective used to construct the principled gain loss includes minimizing the binary cross-entropy loss between the guided value generated for the individual and the value of the conditional average causal effect estimated for the individual; correspondingly, the principled gain loss is represented by the binary cross-entropy loss between the guided value generated for the individual and the value of the conditional average causal effect estimated for the individual.
[0036] Optionally, the loss function corresponding to the principle gain loss is expressed by the following formula:
[0037]
[0038]
[0039] in, D represents the principle-based gain loss; i x represents the i-th data sample in the dataset; i t represents the covariate contained in the i-th data sample; i The binary processing variable is represented by y. i Represents the binary result variable; g(t) represents the estimated conditional average causal effect on individual i corresponding to the i-th data sample; i ,y i ) represents the guiding function; BCE represents the binary cross-entropy loss function; Indicates to The sigmoid function is used for normalization; 1 represents the first guiding value; 0 represents the second guiding value.
[0040] Optionally, the task objective of the gain model further includes: a reconstruction task of reconstructing the binary processing variables contained in the data sample based on the covariates and the binary processing variables contained in the data sample; the base model loss also includes a reconstruction loss corresponding to the reconstruction task;
[0041] The reconstruction loss is represented by the binary cross-entropy loss between the actual value of the binary processing variable contained in the data sample and the reconstructed value of the binary processing variable.
[0042] Optionally, the gain model further includes a second prediction task: predicting the propensity value of the individual based on the covariates contained in the data sample; wherein the propensity value represents the probability of performing the preset treatment on the individual; and the base model loss further includes a prediction loss corresponding to the second prediction task.
[0043] The prediction loss is represented by a binary cross-entropy loss between an actual value of the binary treatment variable contained in the data sample and a predicted propensity value of the individual.
[0044] Optionally, the method further comprises:
[0045] calculating a curve value corresponding to an individual in a validation data set based on the principle gain curve;
[0046] evaluating an accuracy of the gain model in ranking individuals in the validation data set based on the conditional average causal effect based on the curve value.
[0047] Optionally, the gain model is a three-headed neural network with multi-task objectives; the three-headed neural network comprises a first neural network head for performing the first prediction task; a second neural network head for performing the reconstruction task; and a third neural network head for performing the second prediction task.
[0048] Optionally, the data set comprises a product marketing data set; the individual comprises a product; the preset treatment comprises a product promotion strategy; the preset result comprises a purchase intention of a user for the product; the covariate represents product attribute information of the product; the binary treatment variable represents whether the product promotion strategy is launched for the product; the binary result variable represents whether the user has the purchase intention for the product; and the conditional average causal effect of the individual comprises a conditional average causal effect of the product promotion strategy launched for the product on the purchase intention of the user for the product.
[0049] The specification also proposes an optimization method for a gain model, the method comprising:
[0050] obtaining a data set to be processed; wherein a data sample in the data set contains a covariate; the covariate is used to represent an individual characteristic of an individual;
[0051] inputting the data sample in the data set into the trained gain model to perform prediction calculation corresponding to a task objective of the gain model on the data sample by the gain model;
[0052] The prediction calculation includes estimating a conditional average causal effect of a binary preset processing performed on the individual on a binary preset result based on the data sample, and ranking the individuals in the data set according to the estimated conditional average causal effect in descending order; the model loss of the gain model includes a basic model loss calculated based on a result of a training calculation output by the gain model; and an auxiliary loss for guiding the gain model to estimate a conditional average causal effect greater than that of an unconvincible individual for a convincing individual; the convincing individual includes an individual who produces the preset result when the preset processing is performed, and an individual who does not produce the preset result when the preset processing is not performed; and the unconvincible individual includes an individual who produces the preset result when the preset processing is not performed, and an individual who does not produce the preset result when the preset processing is performed.
[0053] The present application has the following technical effects:
[0054] The present application optimizes the ranking ability of the gain model by regarding an individual who does not produce a preset result when the preset processing is not performed as a potential convincing individual, regarding an individual who does not produce the preset result when the preset processing is performed as a potential unconvincible individual, and explicitly introducing an auxiliary loss for guiding the gain model to estimate a conditional average causal effect greater than that of an unconvincible individual for a convincing individual into the loss function of the gain model, so that the trained gain model can estimate a conditional average causal effect greater than that of an unconvincible individual for a convincing individual, and rank the convincing individual before the unconvincible individual, thereby significantly improving the accuracy of the gain model in ranking individuals based on the estimated conditional average causal effect. BRIEF DESCRIPTION OF DRAWINGS
[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present specification, the drawings required in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments described in the present specification, and other drawings can also be obtained by those skilled in the art without creative labor.
[0056] Figure 1 is a flowchart of an optimization method for a gain model in an embodiment of the present specification;
[0057] Figure 2 is a schematic diagram of a network structure of a gain model in an embodiment of the present specification;
[0058] Figure 3is a flow chart of another optimization method for a gain model shown in an embodiment of the present specification;
[0059] Figure 4 is a schematic structural diagram of an electronic device shown in an embodiment of the present specification;
[0060] Figure 5 is a block diagram of an optimization device for a gain model shown in an embodiment of the present specification;
[0061] Figure 6 is a block diagram of another optimization device for a gain model shown in an embodiment of the present specification. DETAILED DESCRIPTION
[0062] In order to enable persons skilled in the art to better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be described clearly and completely in the following with reference to the drawings in the embodiments of the present specification. Obviously, the described embodiments are only some of the embodiments of the present specification, not all. Based on the embodiments in the present specification, all other embodiments obtained by persons skilled in the art without creative labor should fall within the scope of protection of the present specification.
[0063] Treatment Effect, usually used to represent the difference in the influence on whether a certain specific result can be produced by performing or not performing a certain treatment on an individual. Through the treatment effect, those individuals who are more sensitive to the treatment can be found.
[0064] Conditional Average Treatment Effect (hereinafter referred to as CATE), usually used to represent the average causal effect of whether a certain specific result can be produced by performing or not performing a certain treatment on an individual in a group of individuals, under the condition that each individual in the group of individuals has a certain individual characteristic described by an external covariate. Through the average causal effect, a group of individuals who are more sensitive to the treatment can be found.
[0065] For example, in the field of commodity marketing, the gain model is used to estimate the commodity promotion strategy for the commodity, the CATE of whether the user has the purchase intention for the commodity, and the CATE of the commodity is used to sort all the commodities, so that a set of commodities that respond positively to the commodity promotion strategy can be identified, and unnecessary resource investment can be avoided for those commodities that are not sensitive to the commodity promotion.
[0066] In practical applications, the core goal of gain modeling is to quantify the difference in outcomes that different groups of individuals can produce under the condition of being treated and not being treated, by estimating the CATE of some treatment for different groups of individuals relative to some specific outcome, and ranking these groups of individuals in descending order of the estimated CATE values, so that the decision maker can find those target groups of individuals who are most sensitive to the intervention from the top-ranked groups of individuals.
[0067] where CATE can be defined in the form of a function as:
[0068]
[0069] where τ(x) represents the CATE of an individual, Y i (1) represents the outcome of the i-th sample (i.e., the i-th individual) when the treatment T = 1 is applied, Y i (0) represents the outcome of the i-th sample when the treatment T = 0 is applied. T = 1 means that the individual is subjected to some treatment; T = 0 means that the individual is not subjected to some treatment.
[0070] According to the CATE value of an individual, the individual can generally be divided into the following four categories:
[0071] Persuadables, whose τ(x) values are generally greater than 0;
[0072] Sure Things, whose τ(x) values are generally equal to 0;
[0073] Lost Causes, whose τ(x) values are also generally equal to 0;
[0074] Sleeping Dogs, whose τ(x) values are generally greater than 0;
[0075] Gain models mainly focus on Persuadables and Sleeping Dogs, because these individuals have non-zero τ(x).
[0076] The core goal of gain modeling is to rank CATE values and ensure that Persuadables are ranked before other individuals, especially Sleeping Dogs, rather than precisely estimating the CATE values themselves. After estimating the CATE values of all individuals, a gain model can generally rank all individuals in descending order of CATE values. An unbiased gain model generally has the ability to rank Persuadables before other individuals, especially Sleeping Dogs.
[0077] Therefore, the ability of accurately evaluating the ranking of individuals by the gain model based on the CATE value is the main goal of optimizing the gain model.
[0078] In the related art, when evaluating the ability of ranking individuals by the gain model based on the CATE value, the evaluation indicators such as the uplift curve and the Qini curve can be usually used. These evaluation indicators evaluate the performance of the model by quantifying the cumulative gain of the ranked individuals.
[0079] Specifically, after ranking the individuals in descending order according to the CATE value estimated by the gain model, the performance of the gain model can be usually evaluated by quantifying the cumulative gain derived from the difference between the number of individuals with positive results (i.e., Y(1) = 1) in the treatment group and the number of individuals with positive results (i.e., Y(0) = 1) in the control group through the uplift curve and the Qini curve. The higher the corresponding curve value of an individual in the uplift curve and the Qini curve, the better the gain model.
[0080] However, the conventional uplift curve and the Qini curve usually only focus on the number of individuals with positive results (i.e., Y(1) = 1) in the treatment group and the number of individuals with positive results (i.e., Y(0) = 1) in the control group when evaluating the ranking ability of the gain model, and significantly ignore the individuals with negative results (i.e., Y i (1) = 0 and Y i (0) = 0) in the treatment group and the control group.
[0081] Since the curve value is used to quantify the accuracy of ranking individuals by the gain model, it is usually positively correlated with the accuracy of ranking individuals by the gain model; the higher the curve value, the better the ranking ability of the gain model for individuals. Based on this, it can be seen that this unbalanced evaluation method can cause a biased gain model to obtain a higher curve value by simply ranking the individuals with positive results in the treatment group above other individuals, which can even exceed the unbiased gain model that can correctly distinguish these individuals.
[0082] Moreover, in actual applications, when optimizing the ranking ability of the gain model for individuals, the conventional uplift curve or the Qini curve is usually used to evaluate the ranking ability of the gain model first, and then the ranking ability of the gain model is adjusted after the evaluation based on the evaluation results.
[0083] This also means that the biased evaluation indicators can cause the ranking ability of the gain model to also have the same bias, thereby causing the problem of inaccurate ranking of the gain model.
[0084] For example, in order to adapt to the evaluation result of the conventional gain curve or Qini curve, the gain model may only pay attention to the individuals with positive results (i.e., Y i (1) = 1) in the treatment group and the individuals with positive results (i.e., Y i (0) = 1) in the control group when ranking, and ignore the individuals with negative results (i.e., Y i (1) = 0 and Y i (0) = 0) in the treatment group and the control group, which may cause the individuals with negative results in the control group to be ranked before the individuals with positive results in the treatment group or the control group, thereby causing the problem of incorrect ranking.
[0085] Based on this, the specification proposes a technical solution for optimizing the ranking ability of the gain model by taking the individuals without the preset result without the preset processing as potential persuadable individuals, taking the individuals without the preset result with the preset processing as potential unpersuadable individuals, and explicitly introducing an auxiliary loss for guiding the gain model to estimate a larger conditional average causal effect for the persuadable individuals than for the unpersuadable individuals in the loss of the gain model.
[0086] Please refer to Figure 1 , Figure 1 a flowchart of an optimization method for a gain model shown in the specification; the method includes the following execution process:
[0087] Step 102, obtaining a data set for training the gain model; wherein the data samples in the data set include covariates, binary treatment variables and binary result variables; the covariates are used to represent the individual characteristics of individuals; the binary treatment variables represent whether the preset processing is performed on the individuals; and the binary result variables represent whether the preset result is generated in the case of performing the preset processing on the individuals or not performing the preset processing on the individuals;
[0088] The above data set can be treatment data generated by performing the preset processing on the individuals.
[0089] Among the above data set, the data samples can be divided into covariates, binary treatment variables and binary result variables according to the data content.
[0090] For example, assuming that D i represents the i-th data sample in the above data set, the data sample can be specifically represented as D i = ([x i , t i , y i ]; wherein x ia covariate contained in the data sample, t i a binary treatment variable contained in the data sample, y i a binary outcome variable contained in the data sample.
[0091] The covariate is specifically used to represent the individual characteristics of the individual. The binary treatment variable can be specifically used to represent whether the individual has been subjected to a preset treatment. The binary outcome variable is specifically used to represent whether a preset outcome is generated in the case of subjecting the individual to the preset treatment or not subjecting the individual to the preset treatment.
[0092] It should be noted that the individual can specifically include any form of individual to which a certain treatment can be applied. The preset treatment can specifically include any type of treatment. Correspondingly, the preset outcome can also specifically include any form of outcome that can be generated after a certain treatment is applied to the individual.
[0093] In actual applications, the individual, the preset treatment, and the preset outcome can be flexibly determined based on the specific scenario of the causal effect evaluation. That is, in actual applications, the technical solutions disclosed in the specification can cover all application scenarios of causal effect evaluation.
[0094] For example, in one example, taking the application scenario of commodity marketing as an example, in this scenario, the individual can specifically include a commodity, the data set can specifically include a commodity marketing data set, the preset treatment can specifically include a commodity promotion strategy (such as advertisement placement), and the preset outcome can specifically include a user's purchase intention for the commodity. Correspondingly, at this time, the data sample in the data set can be a marketing data sample corresponding to the commodity, the covariate contained in the data sample can represent the commodity attribute information of the commodity, the binary treatment variable contained in the data sample can represent whether the commodity promotion strategy is launched for the commodity (such as 1 for launching and 0 for not launching), and the binary outcome variable contained in the data sample can represent whether the user has a purchase intention for the commodity (such as 1 for having a purchase intention and 0 for not having a purchase intention). In this case, the conditional average causal effect of the individual estimated by the gain model can be the conditional average causal effect of the commodity promotion strategy launched for the commodity on the user's purchase intention for the commodity. At this time, the conditional average causal effect can be used to represent the difference in the influence on whether the user can have a purchase intention for the commodity caused by launching or not launching the commodity promotion strategy for the commodity.
[0095] Of course, in addition to the above-mentioned application scenario of commodity marketing, the technical solutions of the specification can obviously also be applied to other similar application scenarios of causal effect evaluation.
[0096] For example, in another example, the technical solutions of the present specification can also be applied to the application scenario of evaluating whether issuing a coupon to a user can promote the consumption of the user, in which case the individual described by the covariate can specifically include a user, the preset processing can specifically include the processing of issuing a coupon to the user, and the preset result can specifically include whether the user has generated a consumption behavior.
[0097] It should be emphasized that, in actual application, the individual characteristics of the individual described by the covariate can be the characteristics of a group of individuals, or the individual characteristics of a specific individual, which can be flexibly defined based on specific needs in actual application.
[0098] For example, in actual application, if the individual characteristics of the individual described by the covariate are sufficiently detailed, there can be no group of individuals that can have the characteristics of the individual, in which case the individual described by the individual characteristics can be a specific individual.
[0099] It should also be noted that, for the data set, the data samples in the data set can be divided into a treatment group and a control group according to the binary treatment variable contained in the data samples.
[0100] The binary treatment variable contained in the data samples in the treatment group has a first value representing that the individual corresponding to the data sample has been subjected to the preset processing; for example, the first value can be represented by 1. The binary treatment variable contained in the data samples in the control group has a second value representing that the individual corresponding to the data sample has not been subjected to the preset processing; for example, the second value can be represented by 0.
[0101] Step 104: inputting the data samples in the data set into the gain model to perform training calculation corresponding to the task target of the gain model on the data samples by the gain model; wherein the training calculation includes estimating the conditional average causal effect of the preset processing on the individual with respect to the preset result based on the data samples, and sorting the individuals in the data set in descending order of the estimated values of the conditional average causal effect;
[0102] When the data set used to train the gain model is obtained, the data samples in the data set can be input into the gain model to perform training calculation corresponding to the task target of the gain model on the data samples by the gain model.
[0103] Wherein, as a gain model, the basic task objective thereof can specifically include estimating the CATE of the preset processing on the individual with respect to the preset result that can be generated based on the data sample, and ranking the individuals in the data set in descending order of the estimated value of the CATE.
[0104] In this case, the training calculation can specifically include estimating the CATE of the preset processing on the individual with respect to the preset result that can be generated based on the input data sample, and ranking the individuals in the data set in descending order of the estimated value of the CATE.
[0105] It should be noted that according to the definition of CATE, the CATE of an individual is usually further estimated based on the individual characteristics of the individual, the first result of whether the preset result is generated in the case of the preset processing on the individual, and the second result of whether the preset result is generated in the case of not performing the preset processing on the individual.
[0106] Therefore, the basic task objective of the gain model can be specifically represented as learning a feature representation corresponding to the individual from the individual characteristics contained in the data sample, and further predicting a binary prediction result of whether the preset result is generated in the case of the preset processing on the individual and the case of not performing the preset processing on the individual based on the feature representation.
[0107] In this case, when the gain model estimates the conditional average causal effect of the individual based on the input data sample, it can first learn a feature representation corresponding to the individual from the individual characteristics contained in the data sample; then, based on the learned feature representation, it predicts whether the preset result is generated in the case of the preset processing on the individual to obtain a first prediction result, and predicts whether the preset result is generated in the case of not performing the preset processing on the individual to obtain a second prediction result; then, based on the first prediction result and the second prediction result, it further estimates the CATE of the preset processing on the individual with respect to the preset result to obtain the value of the CATE corresponding to the individual.
[0108] Wherein, the specific process of further estimating the CATE of the preset processing on the individual with respect to the preset result based on the first prediction result and the second prediction result will not be described in detail in the specification.
[0109] Step 106, calculating a model loss generated by training the gain model; wherein the model loss includes a basic model loss calculated based on a result of the training calculation output by the gain model; and an auxiliary loss for guiding the gain model to estimate a condition average causal effect greater than an unconvincible individual for a persuadable individual; the persuadable individual includes an individual who produces the preset result in the case of performing the preset processing, and an individual who does not produce the preset result in the case of not performing the preset processing; and the unconvincible individual includes an individual who produces the preset result in the case of not performing the preset processing, and an individual who does not produce the preset result in the case of performing the preset processing;
[0110] When the gain model performs the training calculation corresponding to the task target that the gain model has on the input data sample, the result of the training calculation output by the gain model can be obtained, and then the model loss generated by training the gain model is further calculated based on the result of the training calculation.
[0111] The above-mentioned model loss can specifically include a basic model loss calculated based on the result of the training calculation output by the gain model.
[0112] In some embodiments, the above-mentioned basic model loss can specifically include a prediction loss corresponding to the above-mentioned first prediction task; in actual application, the prediction loss can be specifically represented by a binary cross-entropy loss between the actual value of the binary result variable contained in the data sample and the result value of the binary prediction result of whether to produce the above-mentioned preset result.
[0113] For example, the loss function corresponding to the prediction loss of the above-mentioned first prediction task can be represented by the following formula:
[0114]
[0115] Wherein, represents the prediction loss corresponding to the above-mentioned first prediction task calculated based on the i th data sample; BCE represents the binary cross-entropy loss function; t i represents the binary processing variable contained in the i th data sample, h Y (x i ,t i ) represents the result value of the binary prediction result of whether to produce the above-mentioned preset result predicted based on the covariate and the binary processing variable contained in the i th data sample.
[0116] In addition, in the present specification, in order to optimize the ability of the gain model to rank individuals based on the value of CATE, instead of relying on the results of the evaluation to make post-adjustments to the ranking ability of the gain model after evaluating the ranking ability of the gain model, an auxiliary loss is explicitly introduced into the loss of the model to guide the gain model to estimate a larger conditional average causal effect for persuadable individuals than for unpersuadable individuals, and the ranking ability of the gain model is optimized.
[0117] It should be noted that the persuadable individual generally refers to an individual for which the preset processing has a positive effect, and the unpersuadable individual generally refers to an individual for which the preset processing has a negative effect.
[0118] Unlike conventional evaluation indicators such as gain curves or Qini curves, which only consider individuals who produce the preset results as persuadable individuals when the preset processing is performed, and individuals who produce the preset results as unpersuadable individuals when the preset processing is not performed, in the present specification, the persuadable individuals and the unpersuadable individuals can be redefined.
[0119] Specifically, in the present specification, the persuadable individual can also include an individual who does not produce the preset results when the preset processing is not performed. That is, in the present specification, the unpersuadable individual can include, in addition to an individual who produces the preset results when the preset processing is performed (i.e., an individual for which Y i (1) = 1), an individual who does not produce the preset results when the preset processing is not performed (i.e., an individual for which Y i (0) = 0) as a potential persuadable individual.
[0120] Correspondingly, the unpersuadable individual can also include an individual who does not produce the preset results when the preset processing is performed. That is, in the present specification, the unpersuadable individual can include, in addition to an individual who produces the preset results when the preset processing is not performed (i.e., an individual for which Y i (0) = 1), an individual who does not produce the preset results when the preset processing is performed (i.e., an individual for which Y i (1) = 0) as a potential unpersuadable individual.
[0121] In some embodiments, in order to optimize the defects existing in the evaluation indicators such as the conventional gain curve and the Qini curve, a new evaluation indicator called PUC (Principled Uplift Curve) can be redefined for the gain model. The PUC can also be used to evaluate the accuracy of the gain model in sorting individuals in the data set.
[0122] Wherein, unlike the evaluation indicators such as the conventional gain curve and the Qini curve, the sorting rule used to maximize the curve value of the PUC in constructing the PUC needs to meet the following conditions:
[0123] The same sorting weight is set for the persuadable individuals and the unpersuadable individuals; and the persuadable individuals are sorted before the unpersuadable individuals.
[0124] Correspondingly, the PUC curve constructed based on the sorting rule also needs to meet the following conditions:
[0125] The persuadable individuals and the unpersuadable individuals have the same calculation weight in the curve function corresponding to the PUC; and the curve value calculated based on the PUC reaches the maximum in the case of sorting the persuadable individuals before the unpersuadable individuals.
[0126] Wherein, it is emphasized that the curve value calculated based on the PUC can also be used to quantify the accuracy of the gain model in sorting individuals in the data set; the curve value is positively correlated with the accuracy.
[0127] In this case, the auxiliary loss described above can specifically include the PUL (Principled Uplift loss) loss corresponding to the PUC curve; that is, instead of using the method of relying on the results of the evaluation to adjust the sorting ability of the gain model after evaluating the sorting ability of the gain model by using the redefined PUC curve, the PUL loss corresponding to the PUC curve is explicitly introduced as an auxiliary loss in the loss of the model to optimize the sorting ability of the gain model.
[0128] In an implementation, the sorting rule used to maximize the curve value of the PUC in constructing the PUC can be expressed as the following formula:
[0129]
[0130] In the above formula, S Max (D i ) represents the optimal sorting rule used to sort the individuals in the data set D i , which can maximize the curve value of the PUC. This indicates an indicator function. The function outputs 1 when the condition in parentheses is true, and 0 when the condition is false. i Let t represent the binary processing variable corresponding to the i-th data sample; i =1 indicates that the above-mentioned preset processing has been performed on the individual corresponding to the i-th data sample; t i =1 indicates that the above preset processing is not performed on the individual corresponding to the i-th data sample; y i y represents the binary outcome variable corresponding to the i-th data sample; i =1 indicates that the above-mentioned preset result has been achieved; y i =0 indicates that the above-mentioned preset result was not produced.
[0131] The mathematical logic behind the above sorting rule is that for Y... i (1) = 1 and Y i (0) = 0, and the persuasive individuals for Y i (0) = 1 and Y i (1) = 0 unpersuadable individuals are assigned the same ranking weight of 1; that is, according to this ranking rule, the ranking weights of persuasive individuals and unpersuadable groups are both 1; and, the ranking rule is optimal when persuasive individuals are ranked before unpersuadable individuals.
[0132] Accordingly, the curve function of the PUC curve constructed based on the above sorting rules can be represented by the following formula:
[0133]
[0134] Where S represents the sequence of individuals in the dataset after sorting them in descending order of the estimated conditional average causal effect; D represents the dataset mentioned above; V(k,S) represents the curve value obtained by evaluating the ranking ability of the gain model based on PUC. This represents the number of individuals in the first k individuals of the above individual sequence whose T=1 and Y=1; This represents the number of individuals in the first k individuals of the above individual sequence whose T=0 and Y=0; This represents the number of individuals in the first k individuals of the above individual sequence whose T=0 and Y=1; This represents the number of individuals in the first k individuals of the above individual sequence where T=1 and Y=0; T=1 indicates that the above preset processing was performed on the individual; T=0 indicates that the above preset processing was not performed on the individual; Y=1 indicates that the above preset result was generated; Y=0 indicates that the above preset result was not generated; K represents the preset threshold.
[0135] As can be seen from the curve function of the PUC curve shown above, the same ranking weight 1 is set for the persuadable individual with Y i (1) = 1 and Y i (0) = 0, and the persuadable individual, and the non-persuadable individual with Y i (0) = 1 and Y i (1) = 0; and in the case of ranking the persuadable individual before the non-persuadable individual, the curve value obtained based on the ranking ability of the gain model according to the PUC curve reaches the maximum.
[0136] For example, according to the curve function of the PUC curve shown above, and refers to the persuadable individual redefined in the specification, when and the maximum number of the sum indicates that the number of persuadable individuals in the first k individuals in the above individual sequence is the largest, and at this time the curve value of the curve function can reach the maximum.
[0137] It should be noted that the curve function of the PUC curve shown above is only exemplary, and in actual application, the parameters can be flexibly modified on the basis of the formula of the curve function shown above.
[0138] For example, the following are some variations of the formula of several PUC curve functions shown in some embodiments:
[0139] Variation 1:
[0140]
[0141] Variation 2:
[0142]
[0143] Wherein T and C represent the number of individuals in the treatment group and the control group, respectively.
[0144] Variation 3:
[0145]
[0146] Variation 4:
[0147]
[0148] Variation 5:
[0149]
[0150] Variation 6:
[0151]
[0152] In some embodiments, the gain model described above can be a gain model with multi-task objectives. That is, the gain model described above can have task objectives in addition to the basic task objectives described above, which can include other types of task objectives related to CATE estimation.
[0153] In some embodiments, the gain model described above can have task objectives in addition to the basic task objectives described above, which can include a guidance task. The guidance task can be a guidance task that generates a guidance value for an individual based on a pre-defined guidance function; the guidance value can be used to guide the gain model to estimate a CATE for the individual that is close to the guidance value; the guidance value generated for the persuadable individual can be represented by a first guidance value, and the guidance value generated for the unpersuadable individual can be represented by a second guidance value.
[0154] It should be noted that in order to guide the gain model to estimate a CATE for the persuadable individual that is greater than the unpersuadable individual, the first guidance value can be greater than the second guidance value.
[0155] In this case, the gain model can also perform the guidance task during the training and calculation process for the input data sample, determine the type of individual corresponding to the input data sample; if the individual is the persuadable individual, the first guidance value can be generated for the individual based on the pre-defined guidance function; if the individual is the unpersuadable individual, the second guidance value can be generated for the individual based on the pre-defined guidance function; wherein the first guidance value can be greater than the second guidance value.
[0156] In some embodiments, the optimization objective used to construct the PUL loss can include minimizing the binary cross-entropy loss between the guidance value generated for an individual and the value of the CATE estimated for the individual; accordingly, the PUL loss can be represented by the binary cross-entropy loss between the guidance value generated for an individual and the value of the CATE estimated for the individual.
[0157] For example, in some embodiments, the loss function corresponding to the PUL loss (i.e., the auxiliary loss) can be represented by the following formula:
[0158]
[0159]
[0160] wherein, represents the principle gain loss; D i represents the i-th data sample in the data set; x i represents the covariate contained in the i-th data sample; ti represents a binary processing variable; y i represents a binary result variable; represents an estimated conditional average causal effect of individual i corresponding to the ith data sample; g(t i , y i ) represents the guide function; BCE represents a binary cross-entropy loss function; represents a sigmoid function for normalizing ; 1 represents the first guide value; and 0 represents the second guide value.
[0161] In some embodiments, the guide function can be a binary classification function; in this case, the guide task can include a task of classifying individuals in the data set based on a preset binary classification function; wherein the classification label of the binary classification includes a first classification label for indicating that the individual is a persuadable individual; and a second classification label for indicating that the individual is an unpersuadable individual; the first classification label can be represented by the first guide value (such as 1); and the second classification label can be represented by the second guide value (such as 0).
[0162] In this case, the gain model can perform the guide task in the process of training and calculating for the input data sample, and classify the individual corresponding to the data sample; if the individual is a persuadable individual, the first guide value can be assigned to the individual as the first classification label; and if the individual is a persuadable individual, the second guide value can be assigned to the individual as the first classification label.
[0163] In some embodiments, the gain model has a task objective, and the task objective of the gain model further includes a reconstruction task of reconstructing a binary processing variable included in an input data sample based on a covariate and a binary processing variable included in the data sample; accordingly, the base model loss can further include a reconstruction loss corresponding to the reconstruction task.
[0164] In actual applications, the reconstruction loss can be represented by a binary cross-entropy loss between an actual value of the binary processing variable included in the data sample and a reconstructed value of the reconstructed binary processing variable.
[0165] For example, the loss function corresponding to the reconstruction loss of the reconstruction task can be represented by the following formula:
[0166]
[0167] wherein, represents the prediction loss corresponding to the reconstruction task calculated based on the ith data sample; BCE represents the binary cross-entropy loss function; h T (x i , t i ) represents the reconstructed value of the binary treatment variable.
[0168] In some embodiments, the task objective of the gain model can further include a second prediction task of predicting a propensity value of an individual corresponding to the input data sample based on the covariates contained in the data sample; wherein the propensity value represents the probability of the individual being subjected to the preset treatment. Correspondingly, the base model loss can further include a prediction loss corresponding to the second prediction task;
[0169] In actual application, the prediction loss corresponding to the second prediction task can be represented by the binary cross-entropy loss between the actual value of the binary treatment variable contained in the data sample and the predicted propensity value of the individual corresponding to the data sample.
[0170] For example, the loss function corresponding to the prediction loss of the second prediction task can be represented by the following formula:
[0171]
[0172] wherein, represents the prediction loss corresponding to the second prediction task calculated based on the ith data sample; BCE represents the binary cross-entropy loss function; h i ) represents the predicted propensity value of the individual corresponding to the data sample.
[0173] Please refer to Figure 2 , Figure 2 is a schematic diagram of a network structure of a gain model shown in the specification.
[0174] In some embodiments, the gain model can specifically be a neural network using a three-headed neural network as the backbone network; the neural network head refers to the part of the neural network responsible for the output of a specific task.
[0175] As shown in Figure 2 , the three-headed neural network can specifically include a first predictor (corresponding to the first neural network head) for performing the first prediction task, a reconstructor (corresponding to the second neural network head) for performing the reconstruction task, and a second predictor (corresponding to the third neural network head) for performing the second prediction task.
[0176] As shown in Figure 2 , the gain model can specifically include:
[0177] a representation learner Φ, which can be formed by a layer of Q x M and a plurality of layers of M x M full connection layers connected in sequence, and an ELU activation function is connected after each layer of full connection layer.
[0178] a representation learner h, which can be formed by a layer of (M+1) x M full connection layer and a layer of M x M full connection layer connected in sequence, and an ELU activation function is connected after each layer of full connection layer.
[0179] a first predictor (corresponding to the first neural network head) for performing the first prediction task described above, which can be formed by a layer of M x M full connection layer and a layer of M x 1 full connection layer connected in sequence, and an ELU activation function is connected after the first layer of full connection layer.
[0180] a reconstructor (corresponding to the second neural network head) for performing the reconstruction task described above, which is formed by a layer of M x M full connection layer and a layer of M x 1 full connection layer connected in sequence, and an ELU activation function is connected after the first layer of full connection layer;
[0181] a second predictor (corresponding to the third neural network head) for performing the second prediction task described above, which is formed by a layer of M x M full connection layer and a layer of M x 1 full connection layer connected in sequence, and an ELU activation function is connected after the first layer of full connection layer.
[0182] a director for specifying the guidance task described above, which is formed by a layer of explicitly defined guidance function g(t i ,y i ) and estimated conditional average causal effect . In actual application, as mentioned above, the director can be a binary classifier.
[0183] It should be noted that the value range of Q and M mentioned above can be flexibly set based on actual needs, which will not be described in detail in this specification.
[0184] Step 108, adjusting the model parameters of the gain model based on the calculated model loss of the gain model, to complete the training of the gain model.
[0185] When the model loss generated by training the gain model is calculated, the model parameters of the gain model can be adjusted based on the model loss to complete the training of the gain model.
[0186] For example, in some embodiments, the loss function corresponding to the final model loss of the gain model can be represented by the following formula:
[0187]
[0188] wherein, respectively represent the loss function corresponding to the base model loss and the loss function corresponding to the PUL loss (i.e., the auxiliary loss described above); β is a hyperparameter.
[0189] Further, the base model loss described above can be represented by the following formula:
[0190]
[0191] In some embodiments, in order to enhance the robustness and scalability of the gain model, a regularization term can also be added to the base model loss described above, in which case the base model loss described above can be represented by the following formula:
[0192]
[0193] wherein α is a hyperparameter; ∈ is a learnable parameter.
[0194] In some embodiments, after the training of the gain model is completed, the curve values corresponding to the individuals in the validation data set can also be calculated based on the PUC curve, and the accuracy of the gain model in sorting the individuals in the validation data set based on CATE can be evaluated based on the curve values.
[0195] wherein when calculating the curve values corresponding to the individuals in the validation data set, the specific calculation can be performed by counting the number of individuals in the individual sequence after the individuals in the validation data set are sorted in descending order of CATE. and are calculated, and the specific process is not described in detail.
[0196] In some embodiments, the training method used for training the gain model is not specifically limited in the present specification, and in actual applications, a suitable training method can be selected flexibly based on specific needs.
[0197] For example, in some embodiments, the early stopping technique is used to train the gain model on the data set;
[0198] Specifically, the patience value, the counter, and the optimal principle gain curve can be initialized; then, the data samples in the data set are input into the gain model for training calculation, and the output results of the training calculation are obtained, which are input into the loss function described above to obtain the loss value, and the parameters of the gain model are updated with the minimization of the loss value as the optimization target;
[0199] Further, the validation set can also be input into the gain model after the parameter update, and the output result of the model is obtained, and the CATE of the individuals in the validation set is calculated according to the output result of the model, and the individuals in the validation set are sorted in descending order according to the value of CATE.
[0200] Further, the curve value of the PUC curve can also be calculated according to the sorted causal effect, and if the value is less than the optimal curve value of the PUC curve, the curve value can be taken as a new optimal curve value, the counter is reset to zero, and the model parameters of the gain model are saved; otherwise, the counter is incremented by 1.
[0201] Finally, the above process can be iterated continuously until the loss function of the gain model converges, and a trained gain model is obtained.
[0202] Please refer to Figure 3 , Figure 3 Another flowchart of an optimization method for a gain model shown in the specification; the method includes the following execution process:
[0203] Step 302, obtaining a data set to be processed; wherein the data samples in the data set contain covariates; the covariates are used to represent individual characteristics of individuals;
[0204] Step 303, inputting the data samples in the data set into the trained gain model, so that the gain model performs prediction calculation corresponding to the task target of the gain model on the data samples;
[0205] Wherein, the prediction calculation includes estimating the conditional average causal effect of the binary preset processing on the individual relative to the binary preset result based on the data sample, and sorting the individuals in the data set in descending order according to the value of the estimated conditional average causal effect; the model loss of the gain model includes the basic model loss calculated based on the result of the training calculation output by the gain model; and the auxiliary loss for guiding the gain model to estimate the conditional average causal effect of the persuadable individual to be greater than that of the unpersuadable individual; the persuadable individual includes the individual who produces the preset result in the case of performing the preset processing; and the individual who does not produce the preset result in the case of not performing the preset processing; the unpersuadable individual includes the individual who produces the preset result in the case of not performing the preset processing; and the individual who does not produce the preset result in the case of performing the preset processing.
[0206] It should be noted that, Figure 3The method flow shown describes the process of estimating the CATE of individuals in the data set based on the gain model after the gain model is trained, and sorting the individuals in the data set based on the order of the estimated CATE values from large to small.
[0207] In this case, the above data set is specifically the data set to be processed, and the data samples in the data set can specifically include covariates, and no longer need to include binary treatment variables and binary outcome variables.
[0208] After inputting the data samples in the data set into the trained gain model, the gain model can perform prediction calculation corresponding to the task target of the gain model for the data samples; specifically, the CATE of the individual corresponding to the data sample for the binary preset treatment relative to the binary preset outcome can be estimated based on the data sample, and the individuals in the data set are sorted in order of the estimated CATE values from large to small.
[0209] It should be noted that in this embodiment, the training process of the gain model and the multi-task target of the gain model are the same as the embodiments related to the flow shown, and the specific implementation details will not be described herein. Figure 1 The embodiments related to the flow shown are the same as the embodiments related to the flow shown, and the specific implementation details will not be described herein.
[0210] In the above embodiments, by regarding the individual who does not produce the preset result without the preset treatment as a potential persuadable individual, regarding the individual who does not produce the preset result with the preset treatment as a potential unpersuadable individual, and explicitly introducing an auxiliary loss for guiding the gain model to estimate a condition average causal effect greater than that of the unpersuadable individual for the persuadable individual in the loss function of the gain model, the sorting ability of the gain model is optimized, so that the trained gain model can preferentially estimate a condition average causal effect greater than that of the unpersuadable individual for the persuadable individual, and the persuadable individual is sorted before the unpersuadable individual, thereby significantly improving the accuracy of the gain model in sorting individuals based on the estimated condition average causal effect.
[0211] For example, due to the PUC curve proposed in the present application, for Y i (1) = 1 and Y i (0) = 0, the persuadable individual and the unpersuadable individual are set with the same sorting weight, and in the evaluation process, the persuadable individual and the unpersuadable individual have the same contribution to the final curve value. This unbiased evaluation method is more biased towards Y i (0) = 1 and Y i (1) = 0, and the persuadable individual and the unpersuadable individual have the same contribution to the final curve value. This unbiased evaluation method is more biased towards Y i (1) = 1 and Yi The biased assessment method for individuals with (0) = 1 will not result in a negative outcome for the control group (i.e., Y). i (1) = 0 or Y i Individuals whose (0) = 0 are ranked into the treatment or control group are considered to have a positive result (i.e., Y). i (1) = 1 or Y i The problem of incorrect ranking of individuals (0) = 1) can be solved by significantly improving the accuracy of the gain model when ranking.
[0212] Corresponding to the embodiments of the foregoing methods, this specification also provides embodiments of apparatus, electronic devices, and storage media.
[0213] Figure 4 This is a schematic structural diagram of an electronic device provided in an exemplary embodiment. Please refer to... Figure 4 At the hardware level, the device includes a processor 402, an internal bus 404, a network interface 406, memory 408, and non-volatile memory 410, and may also include other necessary hardware. One or more embodiments of this specification can be implemented in software, for example, the processor 402 reads the corresponding computer program from the non-volatile memory 410 into memory 408 and then runs it. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0214] like Figure 5 As shown, Figure 5 This is a block diagram illustrating an optimization apparatus for a gain model according to an exemplary embodiment of this specification, the apparatus 50 comprising:
[0215] The first acquisition module 501 acquires a dataset for training the gain model; wherein the data samples in the dataset include covariates, binary processing variables, and binary outcome variables; the covariates are used to represent individual characteristics of an individual; the binary processing variables indicate whether a preset processing has been performed on the individual; and the binary outcome variables indicate whether a preset result has been generated whether the preset processing has been performed on the individual or not.
[0216] The first input module 502 inputs a data sample in the data set into the gain model, so that the gain model performs a training calculation corresponding to the task target of the gain model on the data sample; wherein the training calculation includes estimating a conditional average causal effect of a preset processing on the individual relative to the preset result based on the data sample, and sorting the individuals in the data set according to the values of the estimated conditional average causal effect from large to small;
[0217] The calculation module 503 calculates a model loss generated by training the gain model; wherein the model loss includes a basic model loss calculated based on a result of the training calculation output by the gain model; and an auxiliary loss for guiding the gain model to estimate a conditional average causal effect greater than that of an unconvincible individual for a convincing individual; the convincing individual includes an individual who produces the preset result in the case of performing the preset processing, and an individual who does not produce the preset result in the case of not performing the preset processing; and the unconvincible individual includes an individual who produces the preset result in the case of not performing the preset processing, and an individual who does not produce the preset result in the case of performing the preset processing;
[0218] The adjustment module 504 adjusts the model parameters of the gain model based on the calculated model loss, to complete the training of the gain model.
[0219] As shown in Figure 6 , Figure 6 is a block diagram of another optimization device for a gain model according to an exemplary embodiment of the present specification, the device 60 includes:
[0220] The second acquisition module 601 acquires a data set to be processed; wherein the data sample in the data set contains a covariate; the covariate is used to represent the individual characteristics of an individual;
[0221] The second input module 602 inputs a data sample in the data set into the trained gain model, so that the gain model performs a prediction calculation corresponding to the task target of the gain model on the data sample;
[0222] The prediction calculation includes estimating a conditional average causal effect of a binary preset treatment on the individual with respect to a binary preset result based on the data sample, and sorting the individuals in the data set according to the estimated conditional average causal effect in descending order; the model loss of the gain model includes a basic model loss calculated based on a result of a training calculation output by the gain model; and an auxiliary loss for guiding the gain model to estimate a conditional average causal effect greater than that of an unconvincible individual for a convincing individual; the convincing individual includes an individual who produces the preset result in the case of performing the preset treatment, and an individual who does not produce the preset result in the case of not performing the preset treatment; and the unconvincible individual includes an individual who produces the preset result in the case of not performing the preset treatment, and an individual who does not produce the preset result in the case of performing the preset treatment.
[0223] Correspondingly, the specification also provides an electronic device, which includes a processor, a memory for storing processor-executable instructions, wherein the processor is configured to implement the steps in the method processes described above.
[0224] Correspondingly, the specification also provides a computer-readable storage medium having stored thereon executable computer program instructions; wherein the instructions, when executed by a processor, implement the steps in the method processes described above.
[0225] Correspondingly, the specification also provides a computer program product having stored thereon executable computer program instructions; wherein the computer program instructions, when executed by a processor, implement the steps in the method processes described above.
[0226] In the 1990s, it was relatively easy to distinguish whether an improvement in a technology was a hardware improvement (e.g., an improvement in the circuit structure of a diode, transistor, switch, etc.) or a software improvement (an improvement in a method flow). However, as technology has evolved, many improvements in method flows today can be considered as direct improvements in hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structures by programming the improved method flows into hardware circuits. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using hardware entity modules. For example, a programmable logic device (PLD) (e.g., a field programmable gate array (FPGA)) is an integrated circuit whose logic function is determined by individual programming of the device. A digital system is "integrated" on a PLD by the designer programming it, rather than by asking a chip manufacturer to design and fabricate a custom integrated circuit chip. Moreover, instead of manually fabricating integrated circuit chips, this programming is now mostly implemented using "logic compiler" software, which is similar to software compilers used in program development, and the original code to be compiled is written in a specific programming language, which is called a hardware description language (HDL), and there are many such languages, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., and the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should be aware that, as long as the method flow is logically programmed and programmed into an integrated circuit using the above-mentioned hardware description languages, a hardware circuit that implements the logical method flow can be easily obtained.
[0227] The controller can be implemented in any suitable way, for example, the controller can take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code, such as software or firmware, executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory. The skilled person will also appreciate that, in addition to implementing the controller in pure computer readable program code, it is possible to implement the controller in the form of logic gates, switches, an application specific integrated circuit, a programmable logic controller and an embedded microcontroller, etc. to perform the same functions by logically programming the method steps. Such a controller can therefore be considered to be a hardware component, and the means included therein to perform the various functions can also be considered to be structures within the hardware component. Alternatively, or even additionally, the means to perform the various functions can be considered to be both a software module implementing the method and a structure within a hardware component.
[0228] The systems, apparatuses, modules or units illustrated by the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a server system. Of course, the present application does not rule out that with the development of future computer technology, computers implementing the functions of the above embodiments can be personal computers, laptop computers, vehicle human-computer interaction devices, cellular phones, camera phones, smart phones, personal digital assistants, media players, navigation devices, email devices, game consoles, tablet computers, wearable devices, or combinations of any of these devices.
[0229] Although the method operations of the embodiments of the present specification are described in sequential order, some of the operations can in practical applications be performed concurrently, in parallel, or in a different order. The order of execution of the operations of various embodiments can be changed, and various other operations described, can be deleted or added. Additionally, those of ordinary skill in the art will recognize that the mechanisms of the present disclosure can be implemented using a variety of computing systems and devices, and that the computing systems and devices need not use the same mechanisms or be of the same type. For example, some devices used to implement the mechanisms of the present disclosure can be handheld devices, while other devices can be general purpose computers or servers. Some mechanisms of the present disclosure are described in terms of executing instructions or executing programs, which involve the manipulation of bits and data. However, the mechanisms of the present disclosure can also be implemented in hardware, and can respond to and communicate in a variety of different ways. Bits and data can be stored in computer-readable storage media, which can be any available media that can be read by a computer. Such computer-readable storage media stored in memory can be transitory if it is a signal, such as an electrical, optical, or electromagnetic carrier wave read by a computer. Alternatively, such computer-readable storage media can be non-transitory if it is a non- transitory computer-readable medium, such as a hard disk drive, a solid state drive, a flash drive, or a compact disk.
[0230] For ease of description, the above apparatuses are described in various modules with different functions. Of course, when implementing one or more of the present specification, the functions of the modules can be implemented in the same or multiple software and / or hardware, or the modules implementing the same function can be implemented by a combination of multiple sub-modules or sub-units. The apparatus embodiments described above are only schematic. For example, the division of the units is only a logical function division, and in actual implementation, another division mode can be adopted, for example, multiple units or components can be combined or integrated into another system, or some features can be omitted or not implemented. In addition, the coupling or direct coupling or communication connection between the displayed or discussed units can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0231] The present application is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus generate a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions of a flow or multiple flows and / or blocks Figure 1 The functions of a flow or multiple flows and / or blocks
[0232] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the Figure 1 function specified in the flow or flows and / or blocks Figure 1 of the block or blocks.
[0233] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the Figure 1 function specified in the flow or flows and / or blocks Figure 1 of the block or blocks.
[0234] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0235] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or cache memory, non-volatile memory, such as read-only memory (ROM), EPROM, and / or flash memory. The memory is an example of computer-readable media.
[0236] Computer-readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassettes, magnetic tapes, magnetic disk storage, graphene storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to computing devices. According to the definition herein, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
[0237] Those skilled in the art will appreciate that the one or more embodiments described herein can be provided as a method, a system or a computer program product. Accordingly, the one or more embodiments described herein can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the one or more embodiments described herein can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer readable code.
[0238] The one or more embodiments described herein can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types. The one or more embodiments described herein can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including memory storage devices.
[0239] The various embodiments described in this specification can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types. The various embodiments described in this specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including memory storage devices.
[0240] The above description is only some embodiments of the one or more embodiments described in this specification and is not intended to limit the one or more embodiments described in this specification. The one or more embodiments described in this specification can have various modifications and changes for those skilled in the art. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the specification shall be included in the scope of claims.
Claims
1. A method for optimizing a gain model, the method comprising: obtaining a data set for training a gain model; wherein a data sample in the data set comprises a covariate, a binary treatment variable and a binary outcome variable; the covariate is used to represent an individual characteristic of an individual; the binary treatment variable represents whether a preset treatment is performed on the individual; and the binary outcome variable represents whether a preset outcome is generated in the case of performing or not performing the preset treatment on the individual; inputting the data sample in the data set into the gain model to perform a training calculation corresponding to a task target of the gain model on the data sample by the gain model; wherein the training calculation comprises estimating a conditional average causal effect of a preset treatment performed on the individual with respect to the preset outcome based on the data sample, and ranking the individuals in the data set in descending order of the estimated conditional average causal effect; calculating a model loss generated by training the gain model; wherein the model loss comprises a basic model loss calculated based on a result of the training calculation output by the gain model, and an auxiliary loss for guiding the gain model to estimate a conditional average causal effect greater for a persuadable individual than for a non-persuadable individual; the persuadable individual comprises an individual who generates the preset outcome in the case of performing the preset treatment, and an individual who does not generate the preset outcome in the case of not performing the preset treatment; and the non-persuadable individual comprises an individual who generates the preset outcome in the case of not performing the preset treatment, and an individual who does not generate the preset outcome in the case of performing the preset treatment; adjusting a model parameter of the gain model based on the calculated model loss to complete the training of the gain model. 2.The method of claim 1, wherein an evaluation index corresponding to the gain model comprises a principle gain curve; the auxiliary loss comprises a principle gain loss corresponding to the principle gain curve; and the principle gain curve is used to evaluate an accuracy of ranking the individuals in the data set by the gain model. wherein The principle gain curve is a gain curve constructed based on a ranking rule for maximizing a curve value of the principle gain curve; the ranking rule comprises setting the same ranking weight for the persuadable individual and the non-persuadable individual, and ranking the persuadable individual before the non-persuadable individual. Correspondingly, the persuadable individual and the non-persuadable individual have the same calculation weight in a curve function corresponding to the principle gain curve; and the curve value calculated based on the principle gain curve reaches a maximum in the case of ranking the persuadable individual before the non-persuadable individual. The curve value is used to quantify an accuracy degree of ranking the individuals in the data set by the gain model; and the curve value is positively correlated with the accuracy degree.
3. The method of claim 2, wherein the curve function corresponding to the principle gain curve is represented by the following equation: wherein, S represents a sequence of individuals obtained after individuals in the data set are sorted in descending order according to the estimated conditional average causal effect; D represents the data set; V(k, S) represents a curve value; represents the number of individuals with T=1 and Y=1 among the first k individuals in the individual sequence; represents the number of individuals with T=0 and Y=0 among the first k individuals in the individual sequence; represents the number of individuals with T=0 and Y=1 among the first k individuals in the individual sequence; represents the number of individuals with T=1 and Y=0 among the first k individuals in the individual sequence; T=1 represents that the individual is subjected to the preset processing; T=0 represents that the individual is not subjected to the preset processing; Y=1 represents that the preset result is generated; and Y=0 represents that the preset result is not generated.
4. The method of claim 3, the gain model is a gain model with multi-task objectives; wherein, The gain model has a task objective including: learning a feature representation corresponding to the individual from the individual features contained in the data sample, and further predicting a binary prediction result of whether the preset result is generated in the case of performing the preset processing on the individual and not performing the preset processing on the individual based on the feature representation; The gain model estimates the conditional average causal effect of the individual based on the data sample, including: The gain model learns a feature representation corresponding to the individual from the individual features contained in the data sample; Based on the learned feature representation, a first prediction result of whether the preset result is generated in the case of performing the preset processing on the individual is predicted, and a second prediction result of whether the preset result is generated in the case of not performing the preset processing on the individual is predicted based on the learned feature representation; Based on the first prediction result and the second prediction result, the conditional average causal effect of the preset processing on the individual on the preset result is further estimated, to obtain a value of the conditional average causal effect corresponding to the individual.
5. The method of claim 4, wherein the base model loss includes a prediction loss corresponding to the first prediction task; wherein The prediction loss is represented by a binary cross-entropy loss between an actual value of the binary result variable contained in the data sample and a result value of the binary prediction result of whether the preset result is generated.
6. The method of claim 5, the gain model having a mission objective further comprising: A guidance task of generating a guidance value for the individual based on a preset guidance function; wherein the guidance value is used to guide the gain model to estimate a conditional average causal effect close to the guidance value for the individual; The gain model performs training calculation corresponding to the task objective of the gain model for the data sample, further including: Determining the type of the individual corresponding to the data sample; If the individual is the persuadable individual, generating a first guidance value for the individual based on a preset guidance function; If the individual is the non-persuadable individual, generating a second guidance value for the individual based on a preset guidance function; Wherein the first guidance value is greater than the second guidance value.
7. The method of claim 6, wherein the guide function is a binary classification function; and the guide task comprises: A task of classifying individuals in the data set based on a preset binary classification function; wherein the classification label of the binary classification includes a first classification label for indicating that the individual is a persuadable individual; and a second classification label for indicating that the individual is a non-persuadable individual; the first classification label is represented by the first guidance value; and the second classification label is represented by the second guidance value; Determining the type of the individual corresponding to the data sample includes: Classifying the individual corresponding to the data sample; If the individual is the persuadable individual, assigning the first guidance value to the individual as the first classification label; If the individual is the non-persuadable individual, assigning the second guidance value to the individual as the second classification label.
8. The method of claim 7, the optimization objective employed in constructing the principled gain loss comprises: a binary cross-entropy loss between the guide value generated for the individual and the value of the conditional average causal effect estimated for the individual; correspondingly, the principle gain loss is represented by a binary cross-entropy loss between the guide value generated for the individual and the value of the conditional average causal effect estimated for the individual. 9.The method of claim 8, wherein a loss function corresponding to the principle gain loss is represented by the following formula: wherein denotes the principle gain loss; D i denotes the i-th data sample in the dataset; x i denotes the covariate contained in the i-th data sample; t i The binary processing variable is represented by y. i Represents the binary result variable; g(t) represents the estimated conditional average causal effect on individual i corresponding to the i-th data sample; i ,y i ) represents the guiding function; BCE represents the binary cross-entropy loss function; Indicates to The sigmoid function is used for normalization; 1 represents the first guiding value; 0 represents the second guiding value.
10. The method of claim 9, the gain model having a mission objective further comprising: a reconstruction task of reconstructing the binary treatment variable included in the data sample based on the covariates and the binary treatment variable included in the data sample; and the base model loss further comprises a reconstruction loss corresponding to the reconstruction task; wherein the reconstruction loss is represented by a binary cross-entropy loss between the actual value of the binary treatment variable included in the data sample and the reconstructed value of the binary treatment variable.
11. The method of claim 10, the gain model having a mission objective further comprising: a second prediction task of predicting the propensity value of the individual based on the covariates included in the data sample; wherein the propensity value represents the probability of the individual being subjected to the preset treatment; and the base model loss further comprises a prediction loss corresponding to the second prediction task. wherein the prediction loss is represented by a binary cross-entropy loss between the actual value of the binary treatment variable included in the data sample and the predicted propensity value of the individual. 12.The method of claim 11, further comprising: calculating a curve value corresponding to an individual in a validation data set based on the principle gain curve; evaluating the accuracy of the gain model in ranking the individuals in the validation data set based on the conditional average causal effect based on the curve value. 13.The method of claim 12, wherein the gain model is a three-head neural network with multi-task objectives; the three-head neural network comprises a first neural network head for performing the first prediction task, a second neural network head for performing the reconstruction task, and a third neural network head for performing the second prediction task. 14.The method of claim 13, wherein the data set is a product marketing data set; the individual is a product; the preset treatment is a product promotion strategy; the preset result is a purchase intention of a user for the product; the covariates represent product attribute information of the product; the binary treatment variable represents whether the product promotion strategy is launched for the product; the binary result variable represents whether the user has the purchase intention for the product; and the conditional average causal effect of the individual comprises a conditional average causal effect of the product promotion strategy launched for the product on the purchase intention of the user for the product. 15.A method for optimizing a gain model, the method comprising: obtaining a data set to be processed; wherein a data sample in the data set includes covariates; and the covariates are used to represent individual characteristics of an individual. inputting a data sample in the dataset into the trained gain model to perform, by the gain model, a prediction calculation corresponding to a task objective of the gain model for the data sample; wherein the prediction calculation comprises estimating, based on the data sample, a conditional average causal effect of a binary preset process performed on the individual on a binary preset result, and ranking the individuals in the dataset according to the estimated conditional average causal effect in a descending order; a model loss of the gain model comprises a base model loss calculated based on a result of a training calculation output by the gain model; and an auxiliary loss for guiding the gain model to estimate a larger conditional average causal effect for a persuadable individual than for a non-persuadable individual; the persuadable individual comprises an individual who produces the preset result in a case where the preset process is performed, and an individual who does not produce the preset result in a case where the preset process is not performed; and the non-persuadable individual comprises an individual who produces the preset result in a case where the preset process is not performed, and an individual who does not produce the preset result in a case where the preset process is performed.
16. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, The processor, when executing the computer program, implements the steps of the method of any one of claims 1 to 15.
17. A computer program product comprising a computer program which, when executed by a processor, implements the steps of the method of any one of claims 1 to 15.
Citation Information
Patent Citations
Target task decision-making method and device, electronic equipment and storage medium
CN115239068A
Intervention execution method, device and equipment for user
CN115841068A
Gain prediction method, model training method and device based on causal effect estimation
CN117408745A
Verifiable calibration method for causal decision task
CN118333165A
Model training method and device, user determination method and device, equipment and product
CN118966309A