Method and device for training result prediction model, storage medium and electronic equipment
By combining the regression model and the propensity score model, a fusion model is formed, which solves the problem of selective bias in decision-making problems, and improves prediction accuracy and training efficiency.
Patent Information
- Application Number
- CN202510368489.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-26
AI Technical Summary
The prior art faces selective bias when solving decision-making problems, especially sample bias and feature bias, which makes the model unable to effectively predict counterfactual results.
By combining the regression model and the propensity score model, a fusion model is formed. The fusion model is first trained based on the observation data, and then the trained model is used to generate counterfactual results, and an unbiased augmentation signal is constructed, which is finally used to train the result prediction model.
It effectively solves the data deviation problem, improves training efficiency and prediction accuracy, and can better handle complex scenarios of multiple decision items.
Smart Images

Figure CN119884761A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to computer technology, and in particular to a method, device, storage medium and electronic device for training a result prediction model. Background Art
[0002] In actual application scenarios, decision-making problems often occur. For example, the timing of outbound calls, identity verification recommendations and other scenarios are essentially decision-making problems, and all require predictions based on customer characteristics. The above decision-making problems belong to causal inference. The difficulty in solving such decision-making problems in the prior art lies in the problem of selective bias. One aspect is sample bias. Taking the timing scenario of outbound calls as an example, it is usually expected to predict the answering rate of each type of customer at each time point, but the training data collected often only has the results of this type of user answering the phone at a specific time point, and the labels of outbound calls at other time points are missing. Another aspect is feature bias. Taking the timing scenario of outbound calls as an example, the data collected based on historical strategies have different distributions of customer features for outbound calls at each time point. This distribution difference will make the model incapable of predicting counterfactual results. Summary of the invention
[0003] The purpose of the embodiments of this specification is to provide a method, device, storage medium and electronic device for training a result prediction model.
[0004] The embodiment of this specification provides a method for training a result prediction model, which can effectively solve the problem of data deviation and improve training efficiency and prediction accuracy. The method includes: Obtaining first sample training data, wherein the first sample training data includes feature data of a sample object, a first decision item, and a fact result of the sample object with respect to the first decision item; Training the fusion model based on the first sample training data to obtain a trained fusion model, wherein the fusion model includes a regression model and a propensity score model; Inputting the second decision item and the feature data into the trained fusion model to obtain a counterfactual result of the second decision item output by the regression model and a propensity score result output by the propensity score model; Constructing an unbiased augmented signal according to the first sample training data and the output of each decision item of the obtained fusion model; Constructing second sample training data, wherein the second sample training data includes a third decision item and the feature data, and the third decision item includes the first decision item and the second decision item; The result prediction model is trained according to the second sample training data and the unbiased augmented signal to obtain a trained result prediction model.
[0005] Furthermore, the step of training the fusion model based on the first sample training data to obtain a trained fusion model includes: Inputting the first decision item into a regression model in the fusion model, obtaining an expected result output by the regression model corresponding to the first decision item, and constructing a first loss function based on the expected result and the observation result; Inputting the feature data into a propensity score model in a fusion model, obtaining a propensity score result corresponding to the sample object output by the propensity score model, and constructing a second loss function based on the propensity score result and the first decision item; The fusion model is trained according to the first loss function and the second loss function to obtain a trained fusion model.
[0006] Further, the training the fusion model according to the first loss function and the second loss function to obtain the trained fusion model includes: Constructing a third loss function according to the first loss function, the second loss function and a balance parameter, and training the fusion model according to the third loss function; The fusion model is converged by adjusting the balance parameter to obtain a trained fusion model.
[0007] Furthermore, the propensity score model includes a first embedding layer and a first linear layer, the regression model includes a second embedding layer and a second linear layer, and the input of the second linear layer includes a second vector output by the second embedding layer and a first vector output by the first embedding layer.
[0008] Furthermore, the step of training the result prediction model according to the second sample training data and the unbiased augmented signal to obtain the trained result prediction model includes: Input the second sample training data into the result prediction model to obtain the target expected result of the sample object output by the result prediction model regarding the third decision item, and train the result prediction model through a fourth loss function constructed based on the target expected result and the unbiased augmented signal to obtain a trained result prediction model.
[0009] Furthermore, the result prediction model includes a third embedding layer, a fourth embedding layer and a third linear layer, the input of the third embedding layer is the feature data, the input of the fourth embedding layer is the third decision item, and the input of the third linear layer includes a third vector output by the third embedding layer and a fourth vector output by the fourth embedding layer.
[0010] The present specification also provides a method for predicting results, including: Obtaining feature data and target decision items corresponding to the target object; The feature data and the target decision item are input into a trained result prediction model to obtain a prediction result corresponding to the target object, wherein the result prediction model is trained based on the method for training a result prediction model described in an embodiment of this specification.
[0011] The embodiment of this specification also provides a device for training a result prediction model, including: A first obtaining module, configured to obtain first sample training data, wherein the first sample training data includes feature data of a sample object, a first decision item, and a fact result of the sample object with respect to the first decision item; A first training module, used for training a fusion model based on the first sample training data to obtain a trained fusion model, wherein the fusion model includes a regression model and a propensity score model; A second acquisition module is used to input the second decision item and the feature data into the trained fusion model to obtain the counterfactual result of the second decision item output by the regression model and the propensity score result output by the propensity score model; A first construction module is used to construct an unbiased augmented signal according to the first sample training data and the output of each decision item of the obtained fusion model; A second construction module is used to construct second sample training data, wherein the second sample training data includes a third decision item and the feature data, and the third decision item includes the first decision item and the second decision item; The second training module is used to train the result prediction model according to the second sample training data and the unbiased augmented signal to obtain a trained result prediction model.
[0012] The embodiment of this specification also provides a device for result prediction, including: The third acquisition module is used to obtain the characteristic data and target decision items corresponding to the target object; The fourth acquisition module is used to input the feature data and the target decision item into a trained result prediction model to obtain a prediction result corresponding to the target object, wherein the result prediction model is trained based on the method for training a result prediction model described in this exemplary embodiment.
[0013] The embodiments of the present specification also provide a storage medium, wherein the storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the steps of the above method.
[0014] An embodiment of the present specification also provides an electronic device, comprising: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the steps of the above method.
[0015] The embodiments of the present specification also provide a computer program product having at least one instruction stored thereon, wherein the at least one instruction implements the steps of the above method when executed by a processor.
[0016] In an embodiment of the present specification, a regression model and a propensity score model are combined into a fusion model, the fusion model is first trained based on the observed first sample training data, and then the counterfactual result is obtained based on the trained fusion model, and an unbiased augmented signal is constructed for the output of each decision item according to the first sample training data and the obtained fusion model, and then the result prediction model is trained based on the unbiased augmented signal. Thus, by combining the regression model and the propensity score model for multi-task representation learning, and fusing multiple prediction models to share parameters to reduce variance, the data bias problem can be effectively solved, and the training efficiency and prediction accuracy can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A flowchart of a method for training a result prediction model provided in an embodiment of this specification.
[0018] Figure 2 A schematic diagram of a framework for training a result prediction model is provided as an example in an embodiment of this specification.
[0019] Figure 3 A flowchart of a method for result prediction provided in an embodiment of this specification.
[0020] Figure 4 A schematic diagram of the structure of a device for training a result prediction model provided in an embodiment of this specification.
[0021] Figure 5 A schematic diagram of the structure of a device for result prediction provided in an embodiment of this specification.
[0022] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0024] See also Figure 1 , is a flow chart of a method for training a result prediction model provided in an embodiment of this specification. In an embodiment of this specification, the method for training a result prediction model is applied to a device for training a result prediction model (hereinafter referred to as a "model training device") or an electronic device equipped with a model training device. Figure 1 The process shown is described in detail, and the method for training the result prediction model may specifically include the following steps: S102: Obtain first sample training data, wherein the first sample training data includes feature data of a sample object, a first decision item, and a fact result of the sample object with respect to the first decision item.
[0025] In some embodiments, the first sample training data is constructed based on observed factual data. In some embodiments, the sample object is a user, and the feature data of the sample object includes the user feature data corresponding to the user. For example, in the outbound call timing scenario, the feature data of the sample object includes the customer feature data collected at various time points for outbound calls. In some embodiments, the first decision item (which may also be called a "processing group" in the context of the decision item) is also the observed processing groups or decision factors. For example, in the outbound call timing scenario, the first decision item can be the observed time point for calling the user, and for example, in the authentication recommendation scenario, the first decision item can be a recommended authentication method, such as face, fingerprint, etc.; the fact result of the sample object regarding the first decision item is also the observed result. For example, in the outbound call timing scenario, the fact result regarding the first decision item can be the observed answering result of calling the user at the time point represented by the first decision item, and for example, in the authentication recommendation scenario, the fact result regarding the first decision item can be the observed authentication result under the authentication method represented by the first decision item. In some embodiments, the first sample training data includes multiple samples, each sample includes an associated first decision item, feature data corresponding to the first decision item, and a fact result corresponding to the first decision item. In the subsequent training process of the fusion model, the label corresponding to the first decision item as input is the fact result corresponding to the first decision item, and the label corresponding to the feature data as input is the first decision item corresponding to the feature data. The specific training process will be described in detail in subsequent embodiments and will not be repeated here.
[0026] In some embodiments, observation results can be obtained by observation over a period of time, and first sample training data can be constructed based on the observation results. In some embodiments, first sample training data provided by other devices can be obtained. It should be noted that the above-mentioned implementation method for obtaining the first sample training data is only an example and not a limitation of the present application. Those skilled in the art should understand that any implementation method for obtaining the first sample training data should be included in the protection scope of the present application.
[0027] S104: Train the fusion model based on the first sample training data to obtain a trained fusion model, wherein the fusion model includes a regression model and a propensity score model.
[0028] In some embodiments, the fusion model is obtained by merging a regression model and a propensity score model, and the regression model and the propensity score model have shared parameters. In some embodiments, each sample in the first sample training data is input into the fusion model for training, and if it does not converge, the model parameters are adjusted to continue training, and if it converges, a trained fusion model is obtained.
[0029] In some embodiments, the propensity score model includes a first embedding layer and a first linear layer, and the regression model includes a second embedding layer and a second linear layer, and the input of the second linear layer includes a second vector output by the second embedding layer and a first vector output by the first embedding layer. In some embodiments, during the training process, a sample in the first sample training data is input into the fusion model, wherein the input of the second embedding layer is the first decision item in the sample (that is, the input of the regression model is the first decision item), and the output of the second linear layer is the prediction result for the first decision item, that is, the output of the regression model; wherein the input of the first embedding layer is the feature data in the sample (that is, the input of the propensity score model is the feature data), and the output of the first linear layer is the propensity score for the feature data, that is, the output of the propensity score model. In some embodiments, the propensity score model also includes a neural network set at the front end of the first embedding layer, such as KAN (Kolmogorov-Arnold Networks, indicating theorem network) and MLP (Multilayer Perceptron) set in sequence at the front end of the first embedding layer, and for example, a fully connected layer set at the front end of the first embedding layer. In some embodiments, the first linear layer and the second linear layer can also be replaced by other neural network structures, such as fully connected layers. The present application does not limit the specific network structure in the fusion model. Those skilled in the art should understand that any existing or future network structure for implementing regression models and propensity score models can be used to form the fusion model described in this application.
[0030] S106, inputting the second decision item and the feature data into the trained fusion model to obtain the counterfactual result of the second decision item output by the regression model and the propensity score result output by the propensity score model.
[0031] In some embodiments, the second decision item is different from the first decision item. In some embodiments, the second decision item is an unobserved processing group or decision factor. For example, in an outbound call timing scenario, if the calling time points are divided into 13 time points from 9 o'clock to 19 o'clock by hour, and the observed calling time points are 9 o'clock, 10 o'clock, 12 o'clock, 14 o'clock, 15 o'clock, 17 o'clock, and 19 o'clock, then the above observed time points are the first decision item, and the unobserved 11 o'clock, 13 o'clock, 16 o'clock, and 18 o'clock are the second decision item, and the result predicted based on the second decision item is the counterfactual result.
[0032] In some embodiments, based on the trained fusion model, the counterfactual results corresponding to all second decision items and the associated propensity score results can be obtained, combined with the propensity score results corresponding to the first decision items during the fusion model training process, that is, all counterfactual results and the propensity score results corresponding to all decision items have been obtained at this time, thereby performing subsequent operations to construct an unbiased augmentation signal.
[0033] S108: construct an unbiased augmented signal according to the first sample training data and the output of each decision item of the obtained fusion model.
[0034] In some embodiments, the output for each decision item includes the output results of the regression model and the propensity score model in step S104 and the output results of the regression model and the propensity score model in step S106. In some embodiments, an augmented signal is first constructed based on the first sample training data and the obtained fusion model for the output of each decision item, and then the feature is regressed using the constructed augmented signal, and then unbiased derivation is performed to obtain an unbiased augmented signal.
[0035] As an example, construct the augmented signal as follows: Among them, t represents the tth decision item, x represents the characteristic data of the sample object, and T represents the input decision item. Represents the augmented signal constructed based on the estimated values of the regression model and the estimated values of the propensity model, represents the expected result of the regression model for the t-th decision item (that is, the output of the regression model for the t-th decision item), represents the propensity score result of the propensity score model for the tth decision item, The function takes the value of 1 when T=t and takes the value of 0 when T≠t. Y represents the label corresponding to the tth decision item (that is, the factual result). The unbiased augmented signal can be obtained by performing unbiased deduction on the above augmented signal.
[0036] S110, constructing second sample training data, wherein the second sample training data includes a third decision item and the feature data, and the third decision item includes the first decision item and the second decision item. The second sample training data is used to train a result prediction model.
[0037] S112: Train a result prediction model according to the second sample training data and the unbiased augmented signal to obtain a trained result prediction model.
[0038] In some embodiments, the unbiased augmented signal is used as a label for the second sample training data, and a supervised algorithm is used to train the result prediction model. In some embodiments, the result prediction model includes a third embedding layer, a fourth embedding layer, and a third linear layer, the input of the third embedding layer is the feature data, the input of the fourth embedding layer is the third decision item, and the input of the third linear layer includes a third vector output by the third embedding layer and a fourth vector output by the fourth embedding layer. In some embodiments, the result prediction model also includes other neural network structures arranged at the front end of the third embedding layer, and the neural network structure is the same as or similar to the neural network structure arranged at the front end of the propensity score model in the fusion model. In some embodiments, the third linear layer can also be replaced by other neural network structures, for example, it can be replaced by a fully connected layer.
[0039] In some embodiments, the training of the fusion model based on the first sample training data to obtain the trained fusion model includes: inputting the first decision item into the regression model in the fusion model, obtaining the expected result corresponding to the first decision item output by the regression model, and constructing a first loss function based on the expected result and the observed result; inputting the feature data into the propensity score model in the fusion model, obtaining the propensity score result corresponding to the sample object output by the propensity score model, and constructing a second loss function based on the propensity score result and the first decision item; training the fusion model according to the first loss function and the second loss function to obtain the trained fusion model. In some embodiments, while inputting the first decision item, the feature data associated with the first decision item is input into the propensity score model in the fusion model, the fact result corresponding to the first decision item is compared with the output of the regression model as a label, and the first decision item is compared with the output of the propensity score model as a label, thereby respectively constructing the first loss function corresponding to the regression model branch and the second loss function corresponding to the propensity score model to obtain a trained fusion model.
[0040] In some embodiments, the training of the fusion model according to the first loss function and the second loss function to obtain a trained fusion model includes: constructing a third loss function according to the first loss function, the second loss function and a balance parameter, and training the fusion model according to the third loss function; and adjusting the balance parameter to make the fusion model converge to obtain a trained fusion model. In some embodiments, the balance parameter is pre-set, and training can be performed based on a plurality of pre-set balance parameters to obtain a converged fusion model. In some embodiments, the balance parameter can be dynamically adjusted in proportion during the training process to obtain a converged fusion model. As an example, the balance parameter λ (λ is a value greater than 0) is set and the network weights are initialized, based on the first sample training data input data (x i ,y i , t i ) to train the fusion model, where x i Represents the characteristic data of the i-th sample, y i represents the fact result of the i-th sample, t i Represents the first decision item corresponding to the i-th sample; if it does not converge, the following algorithm is executed: For the regression model branch in the fusion model, the first loss function corresponding to the regression model branch is calculated: in, Characterize the first loss function, Characterize the loss function form, , , Characterize the neural network function in the regression model, Characterize the feature data corresponding to the i-th sample, Represents the first decision item corresponding to the i-th sample, Represent the fact result corresponding to the i-th sample; for the propensity score model branch in the fusion model, calculate the second loss function corresponding to the propensity score model branch: in, Characterize the second loss function, Characterize the loss function form, , Characterize the neural network function in the propensity score model, Characterize the feature data corresponding to the i-th sample, Represents the first decision item corresponding to the i-th sample; then based on To update the network weights of the fusion model. And so on, until the fusion model converges.
[0041] In some embodiments, the training of the result prediction model according to the second sample training data and the unbiased augmented signal to obtain the trained result prediction model includes: inputting the second sample training data into the result prediction model to obtain the target expected result of the sample object output by the result prediction model with respect to the third decision item, and training the result prediction model by a fourth loss function constructed based on the target expected result and the unbiased augmented signal to obtain the trained result prediction model. In some embodiments, the unbiased augmented signal is used as a label for supervised training to obtain a converged result prediction model.
[0042] This application found that the existing DRL (Doubly Robust Learner) as a means to solve selection bias only supports the sklearn (a machine learning library) model framework, does not support heterogeneous data for representation learning, and needs to establish a prediction model for each decision item, which makes the deployment more complicated in practical applications due to the large number of prediction model inputs. The solution of the embodiment of this specification is creatively expanded based on the idea of traditional DRL. By combining the regression model and the propensity score model for multi-task representation learning, multiple prediction models can be integrated, parameters can be shared, and variance can be reduced. After experiments, this solution has significant advantages over existing technologies (such as Baseline (baseline model), IPW (Inverse Probability Weighting, inverse probability weighting), etc.) in both offline and online testing, and can more effectively solve data bias.
[0043] According to the scheme of the embodiments of the present specification, the regression model and the propensity score model are combined into a fusion model, the fusion model is first trained based on the observed first sample training data, and then the counterfactual result is obtained based on the trained fusion model, and an unbiased augmented signal is constructed for the output of each decision item based on the first sample training data and the obtained fusion model, and then the result prediction model is trained based on the unbiased augmented signal. Thus, by combining the regression model and the propensity score model for multi-task representation learning, and fusing multiple prediction models to share parameters to reduce variance, the data bias problem can be effectively solved, deployment is convenient, and model training efficiency and model prediction accuracy can be improved.
[0044] Figure 2 The following is a schematic diagram of a framework for training a result prediction model as an example provided in the embodiments of this specification. Figure 2As shown, the fusion model includes a regression model branch and a propensity score model branch. The input of the regression model branch is represented as T. The regression model branch includes a second embedding layer and a second linear layer. During the training process, the loss Loss1 of the regression model branch can be obtained based on the output of the regression model and the label Y (that is, the fact result corresponding to the input T during the training process); the input of the propensity score model branch is represented as X. The propensity score model branch includes KAN, MLP, the first embedding layer and the first linear layer. Based on the output of the propensity score model branch and the label T (that is, the decision item corresponding to the input X during the training process), the loss Loss2 of the propensity score model branch can be obtained. The above Loss1 and Loss2 are used to train the fusion model. After that, all counterfactual results and associated propensity score results can be obtained based on the trained fusion model. Based on the outputs of the two branches of the fusion model in the above steps, an unbiased augmentation signal can be constructed as the label of the training result prediction model. The result prediction model can then be trained, as shown in Figure 2 As shown, the input of the result prediction model includes T and X. The result prediction model includes a third embedding layer, a fourth embedding layer, a third linear layer, and KAN and MLP located at the front end of the third embedding layer. The loss Loss can be obtained based on the output of the result prediction model and the unbiased augmentation signal. The parameters of the result prediction model can be adjusted based on the Loss to train and obtain a converged result prediction model. Figure 2 The arrow from the first embedding layer to the second linear layer shows that the regression model branch and the propensity score model branch share the feature data X that is input to the fusion model.
[0045] Figure 3 A flowchart of a method for result prediction provided in an embodiment of this specification, the method comprising the following steps: S202, obtaining feature data and target decision items corresponding to the target object.
[0046] For example, in the outbound call timing scenario, the feature data and target decision item corresponding to the user to be called are obtained, and the target decision item is used to indicate the time node of the call. For another example, in the identity recommendation scenario, the feature data and target decision item corresponding to the user to be authenticated are obtained, and the target decision item is used to indicate the authentication method, such as face, fingerprint, action, etc.
[0047] S204, inputting the feature data and the target decision item into a trained result prediction model to obtain a prediction result corresponding to the target object, wherein the result prediction model is trained based on the method for training a result prediction model described in an embodiment of this specification.
[0048] For example, in the timing scenario of outbound calls, in step S202, feature data and target decision items corresponding to the user to be called are obtained, and the target decision items are used to indicate the time node for making a call. In step S204, the feature data and the target decision items are input into the trained result prediction model to obtain the prediction result of making a call at the time node, which is the result of predicting whether the user will answer the call at the time node. Based on the result prediction model, various indicators corresponding to the target object can be further evaluated. For example, in the timing scenario of outbound calls, the answering rate of the user can be evaluated by predicting the answering results of calling the user at various time nodes.
[0049] Figure 4 A schematic diagram of the structure of a device for training a result prediction model provided in an embodiment of this specification. The device for training a result prediction model (hereinafter referred to as "model training device 1") can be implemented as all or part of an electronic device through software, hardware, or a combination of both. According to some embodiments, the model training device 1 includes a first acquisition module 11, a first training module 12, a second acquisition module 13, a first construction module 14, a second construction module 15, and a second training module 16.
[0050] A first obtaining module 11 is used to obtain first sample training data, wherein the first sample training data includes feature data of a sample object, a first decision item, and a fact result of the sample object with respect to the first decision item; A first training module 12 is used to train the fusion model based on the first sample training data to obtain a trained fusion model, wherein the fusion model includes a regression model and a propensity score model; A second obtaining module 13 is used to input the second decision item and the feature data into the trained fusion model to obtain the counterfactual result of the second decision item output by the regression model and the propensity score result output by the propensity score model; A first construction module 14 is used to construct an unbiased augmented signal according to the first sample training data and the output of each decision item of the obtained fusion model; A second construction module 15, configured to construct second sample training data, wherein the second sample training data includes a third decision item and the feature data, and the third decision item includes the first decision item and the second decision item; The second training module 16 is used to train the result prediction model according to the second sample training data and the unbiased augmented signal to obtain a trained result prediction model.
[0051] In some embodiments, the first training module 12 is used to: Inputting the first decision item into a regression model in the fusion model, obtaining an expected result output by the regression model corresponding to the first decision item, and constructing a first loss function based on the expected result and the observation result; Inputting the feature data into a propensity score model in a fusion model, obtaining a propensity score result corresponding to the sample object output by the propensity score model, and constructing a second loss function based on the propensity score result and the first decision item; The fusion model is trained according to the first loss function and the second loss function to obtain a trained fusion model.
[0052] In some embodiments, the training the fusion model according to the first loss function and the second loss function to obtain the trained fusion model includes: Constructing a third loss function according to the first loss function, the second loss function and a balance parameter, and training the fusion model according to the third loss function; The fusion model is converged by adjusting the balance parameter to obtain a trained fusion model.
[0053] In some embodiments, the propensity score model includes a first embedding layer and a first linear layer, the regression model includes a second embedding layer and a second linear layer, and the input of the second linear layer includes a second vector output by the second embedding layer and a first vector output by the first embedding layer.
[0054] In some embodiments, the second training module 16 is used to: Input the second sample training data into the result prediction model to obtain the target expected result of the sample object output by the result prediction model regarding the third decision item, and train the result prediction model through a fourth loss function constructed based on the target expected result and the unbiased augmented signal to obtain a trained result prediction model.
[0055] In some embodiments, the result prediction model includes a third embedding layer, a fourth embedding layer and a third linear layer, the input of the third embedding layer is the feature data, the input of the fourth embedding layer is the third decision item, and the input of the third linear layer includes a third vector output by the third embedding layer and a fourth vector output by the fourth embedding layer.
[0056] Figure 5A schematic diagram of the structure of a device for result prediction provided in an embodiment of this specification. The device for result prediction (hereinafter referred to as "result prediction device 2") can be implemented as all or part of an electronic device through software, hardware or a combination of both. According to some embodiments, the result prediction device 2 includes a third acquisition module 21 and a fourth acquisition module 22.
[0057] The third obtaining module 21 is used to obtain the characteristic data and target decision items corresponding to the target object; The fourth acquisition module 22 is used to input the feature data and the target decision item into a trained result prediction model to obtain a prediction result corresponding to the target object, wherein the result prediction model is trained based on the method for training a result prediction model described in an embodiment of this specification.
[0058] The above device embodiments correspond to the method embodiments. For specific descriptions, please refer to the description of the method embodiments, which will not be repeated here. The device embodiments are obtained based on the corresponding method embodiments and have the same technical effects as the corresponding method embodiments. For specific descriptions, please refer to the corresponding method embodiments.
[0059] The embodiment of the present specification also provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded by a processor to execute the method of the embodiment of the present specification.
[0060] The embodiments of the present specification also provide a computer program product, which stores at least one instruction, and the at least one instruction is loaded by the processor to execute the method of the embodiments of the present specification.
[0061] The embodiments of this specification also provide Figure 6 The structural diagram of the electronic device shown in FIG. Figure 6 At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the above method.
[0062] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0063] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0064] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, 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 device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0065] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0066] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0067] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0068] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0069] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0070] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.
Claims
1. A method for training an outcome prediction model, comprising: Obtaining first sample training data, wherein the first sample training data includes feature data of a sample object, a first decision item, and a fact result of the sample object with respect to the first decision item; Training the fusion model based on the first sample training data to obtain a trained fusion model, wherein the fusion model includes a regression model and a propensity score model; Inputting the second decision item and the feature data into the trained fusion model to obtain the counterfactual result of the second decision item output by the regression model and the propensity score result output by the propensity score model; Constructing an unbiased augmented signal according to the first sample training data and the output of each decision item of the obtained fusion model; Constructing second sample training data, wherein the second sample training data includes a third decision item and the feature data, and the third decision item includes the first decision item and the second decision item; The result prediction model is trained according to the second sample training data and the unbiased augmented signal to obtain a trained result prediction model.
2. According to the method of claim 1, the training of the fusion model based on the first sample training data to obtain the trained fusion model comprises: Inputting the first decision item into a regression model in the fusion model, obtaining an expected result output by the regression model corresponding to the first decision item, and constructing a first loss function based on the expected result and the observation result; Inputting the feature data into a propensity score model in a fusion model, obtaining a propensity score result corresponding to the sample object output by the propensity score model, and constructing a second loss function based on the propensity score result and the first decision item; The fusion model is trained according to the first loss function and the second loss function to obtain a trained fusion model.
3. The method according to claim 2, wherein the training of the fusion model according to the first loss function and the second loss function to obtain the trained fusion model comprises: Constructing a third loss function according to the first loss function, the second loss function and a balance parameter, and training the fusion model according to the third loss function; The fusion model is converged by adjusting the balance parameter to obtain a trained fusion model.
4. According to the method of claim 2, the propensity score model includes a first embedding layer and a first linear layer, the regression model includes a second embedding layer and a second linear layer, and the input of the second linear layer includes a second vector output by the second embedding layer and a first vector output by the first embedding layer.
5. The method according to claim 1, wherein the training of the result prediction model according to the second sample training data and the unbiased augmented signal to obtain the trained result prediction model comprises: Input the second sample training data into the result prediction model to obtain the target expected result of the sample object output by the result prediction model regarding the third decision item, and train the result prediction model through a fourth loss function constructed based on the target expected result and the unbiased augmented signal to obtain a trained result prediction model.
6. According to the method of claim 5, the result prediction model comprises a third embedding layer, a fourth embedding layer and a third linear layer, the input of the third embedding layer is the feature data, the input of the fourth embedding layer is the third decision item, and the input of the third linear layer comprises a third vector output by the third embedding layer and a fourth vector output by the fourth embedding layer.
7. A method for outcome prediction, comprising: Obtaining feature data and target decision items corresponding to the target object; The feature data and the target decision item are input into a trained result prediction model to obtain a prediction result corresponding to the target object, wherein the result prediction model is trained based on the method described in any one of claims 1 to 6.
8. A device for training a result prediction model, comprising: A first obtaining module, configured to obtain first sample training data, wherein the first sample training data includes feature data of a sample object, a first decision item, and a fact result of the sample object with respect to the first decision item; A first training module, used for training a fusion model based on the first sample training data to obtain a trained fusion model, wherein the fusion model includes a regression model and a propensity score model; A second obtaining module is used to input a second decision item and the feature data into the trained fusion model to obtain a counterfactual result of the second decision item output by the regression model and a propensity score result output by the propensity score model, wherein the second decision item is different from the first decision item; A first construction module is used to construct an unbiased augmented signal according to the first sample training data and the output of each decision item of the obtained fusion model; A second construction module is used to construct second sample training data, wherein the second sample training data includes a third decision item and the feature data, and the third decision item includes the first decision item and the second decision item; The second training module is used to train the result prediction model according to the second sample training data and the unbiased augmented signal to obtain a trained result prediction model.
9. A device for result prediction, comprising: The third acquisition module is used to obtain the characteristic data and target decision items corresponding to the target object; The fourth acquisition module is used to input the feature data and the target decision item into a trained result prediction model to obtain a prediction result corresponding to the target object, wherein the result prediction model is trained based on the method described in any one of claims 1 to 7.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the steps of the method as claimed in any one of claims 1 to 7.
12. A computer program product having at least one instruction stored thereon, characterized in that: When the at least one instruction is executed by the processor, the steps of the method described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Training method and training device of business model and computing equipment
CN115423120A
Model training and information recommendation method and device, storage medium and equipment
CN116308620A
Multi-modal small sample electromagnetic signal classification method and device based on self-supervised learning
CN118260630A
User travel decision causal analysis method based on anti-fact data augmentation
CN119026687A
Rule extraction method and device for network security anomaly detection model
CN119089987A