Causal effect evaluation method and system
Patent Information
- Application Number
- CN202310444964.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-23
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-04-23
AI Technical Summary
比如,用2月份的金融信贷产品数据训练的投资风险模型需要在5月份的金融信贷产品上做预测,此时,就会导致该投资风险模型的预测准确率降低
[0024]由以上技术方案可知,本说明书提供的因果效应评估方法和系统,获取目标对象的对象数据,将对象数据输入评估模型,获得目标对象在预设干预措施下的目标因果效应值,该评估模型对对象数据与训练数据之间的分布偏移不敏感,以及输出目标因果效应值;由于该方案建模得到的评估模型对对象数据与训练数据之间的分布偏移不敏感,从而就可以将该分布偏移造成的评估结果误差控制在预设范围内,因此,可以提升因果效应评估的准确率。
Smart Images

Figure CN116720543B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of causal effect assessment, and in particular to a method and system for causal effect assessment. Background Technology
[0002] In many decision-making scenarios, to improve decision accuracy, causal effect assessment methods are often used to estimate the potential impact of a treatment on different individuals (or a group), and then subsequent decisions are made based on this impact. For example, assessing the effect of a treatment method on the treatment outcome for patients with a certain disease, or evaluating the impact of advertising on consumer purchasing behavior. Existing causal effect assessment methods can model and estimate the causal effect value of the measure using either indirect learners or direct learners.
[0003] In the process of researching and practicing existing technologies, the inventors of this application discovered that when modeling the aforementioned technical problems through direct or indirect learning, the training and testing data often exhibit distribution bias. When deployed to a new environment after training, this distribution bias often leads to deviations in effect estimation. For example, if an investment risk model trained on February's financial credit product data is used to predict financial credit products in May, the model's prediction accuracy will decrease. Similarly, deploying a disease diagnosis model from one hospital to another hospital for diagnosing a specific disease will result in a decrease in the accuracy of disease diagnosis, and so on. Therefore, the accuracy of causal effect assessment is relatively low.
[0004] Therefore, to address the technical problem that the above-mentioned models may produce effect estimation bias due to distribution shifts when deployed in new environments, the relevant fields need to provide a more accurate method and system for causal effect assessment. Summary of the Invention
[0005] This manual provides a more accurate method and system for assessing causal effects.
[0006] In a first aspect, this specification provides a method for evaluating causal effects, comprising: acquiring object data of a target object; inputting the object data into an evaluation model to obtain a target causal effect value of the target object under a preset intervention, wherein the evaluation model is insensitive to the distribution shift between the object data and training data; and outputting the target causal effect value.
[0007] In some embodiments, insensitivity includes: there is a distribution offset between the object data and the training data, and the evaluation model's evaluation result error caused by the distribution offset is within a preset range.
[0008] In some embodiments, the preset range includes any one of 1%, 3%, 5%, 10%, 15%, or 20%.
[0009] In some embodiments, the training data includes target domain data and source domain data, the target domain being different from the source domain, the target domain data including unlabeled samples of the target domain, and the similarity between the feature distribution of the target domain data and the feature distribution of the object data exceeding a preset similarity threshold.
[0010] In some embodiments, the evaluation model is trained by the following steps: acquiring the training data and determining the density ratio between the target domain data and the source domain data in the training data; determining the current pseudo-label corresponding to the training data based on the source domain data, wherein the current pseudo-label includes the pseudo-label of the causal effect value corresponding to the training sample in the training data; and training a preset evaluation model based on the density ratio and the current pseudo-label to obtain the evaluation model.
[0011] In some embodiments, the source domain data includes experimental group sample data and control group sample data, and determining the current pseudo-label corresponding to the training data based on the source domain data includes: training a preset regression network based on the experimental group sample data to obtain an experimental group regression network; training the preset regression network based on the control group sample data to obtain a control group regression network; and determining the current pseudo-label corresponding to the training data based on the experimental group regression network and the control group regression network.
[0012] In some embodiments, training a preset regression network based on the experimental group sample data to obtain an experimental group regression network includes: extracting sample features of the experimental group samples and response values corresponding to the sample features from the experimental group sample data; and training the preset regression network based on the sample features and the response values to obtain the experimental group regression network.
[0013] In some embodiments, determining the current pseudo-label corresponding to the training data based on the experimental group regression network and the control group regression network includes: extracting sample data of the training samples from the training data; inputting the sample data into the experimental group regression network to obtain the experimental group regression value of the training samples; inputting the sample data into the control group regression network to obtain the control group regression value of the training samples; and determining the difference between the experimental group regression value and the control group regression value, and using the difference as a pseudo-label of the causal effect of the training samples.
[0014] In some embodiments, training a preset evaluation model based on the density ratio and the current pseudo-label to obtain the evaluation model includes: determining the uncertainty value of the current pseudo-label, the uncertainty value including a value characterizing the truthfulness of the current pseudo-label; weighting the sample data of the training samples based on the uncertainty value and the density ratio; and training the preset evaluation model based on the current pseudo-label and the weighted sample data to obtain the evaluation model.
[0015] In some embodiments, weighting the sample data of the training samples based on the uncertainty value and the density ratio includes: selecting a target training sample from the training samples based on the uncertainty value; determining an evaluation weight for the target training sample based on the uncertainty value and the density ratio; and weighting the sample data of the target training sample based on the evaluation weight to obtain the weighted sample data.
[0016] In some embodiments, determining the evaluation weight of the target training sample based on the uncertainty value and the density ratio includes: extracting the target uncertainty value corresponding to the target training sample from the uncertainty value; obtaining the evaluation weight parameter corresponding to the target uncertainty value; extracting the target density ratio corresponding to the target training sample from the density ratio; and fusing the evaluation weight parameter and the target density ratio to obtain the evaluation weight of the target training sample.
[0017] In some embodiments, training the preset evaluation model based on the current pseudo-label and the weighted sample data to obtain the evaluation model includes: inputting the weighted sample data into the preset evaluation model to obtain the predicted causal effect value of the target training sample; selecting the target pseudo-label corresponding to the target training sample from the current pseudo-labels, and determining the target loss information of the target training sample based on the predicted causal effect value and the target pseudo-label; and converging the preset evaluation model based on the target loss information to obtain the evaluation model.
[0018] In some embodiments, obtaining the training data includes: obtaining source domain data corresponding to the preset intervention measures; obtaining candidate sample data corresponding to the target object, and selecting target domain data from the candidate sample data; and using the source domain data and the target domain data as the training data.
[0019] In some embodiments, obtaining the source domain data corresponding to the preset intervention includes: obtaining a candidate object set, and selecting experimental objects and control objects from the candidate object set, wherein the experimental objects include at least one candidate object to which the preset intervention is applied, and the control objects include at least one candidate object not to which the preset intervention is applied; obtaining the response data of the experimental objects after the preset intervention is applied to obtain experimental group sample data; obtaining the response data of the control objects after the preset intervention is not applied to obtain control group sample data; and using the experimental group sample data and the control group sample data as the source domain data.
[0020] In some embodiments, obtaining the source domain data corresponding to the preset intervention includes: obtaining historical observation data, which includes historical data observed after applying the preset intervention to the object or without applying the preset intervention; extracting the response data of the experimental object from the historical observation data to obtain experimental group sample data, wherein the experimental object includes at least one object to which the preset intervention was applied; extracting the response data of the control object from the historical observation data to obtain control group sample data, wherein the control object includes at least one object without which the preset intervention was not applied; and using the experimental group sample data and the control group sample data as the source domain data.
[0021] In some embodiments, determining the density ratio between target domain data and source domain data in the training data includes: obtaining the sampling probability of training samples in the target domain data to obtain the target domain sampling probability; obtaining the sampling probability of training samples in the source domain data to obtain the source domain sampling probability; and determining the ratio of the target domain sampling probability to the source domain sampling probability to obtain the density ratio.
[0022] In some embodiments, after outputting the target causal effect value, the method further includes: when the target causal effect value exceeds a preset causal effect threshold, intervening in the target object using the preset intervention measures.
[0023] Secondly, this specification also provides a causal effect assessment system, comprising: at least one storage medium storing at least one instruction set for performing causal effect assessment; and at least one processor communicatively connected to the at least one storage medium, wherein, when the causal effect assessment system is running, the at least one processor reads the at least one instruction set and executes the causal effect assessment method described in the first aspect of this specification according to the instructions of the at least one instruction set.
[0024] As can be seen from the above technical solutions, the causal effect assessment method and system provided in this specification acquire object data of the target object, input the object data into the assessment model, obtain the target causal effect value of the target object under the preset intervention measures, and the assessment model is insensitive to the distribution shift between the object data and the training data, and outputs the target causal effect value. Since the assessment model obtained by this solution is insensitive to the distribution shift between the object data and the training data, the error of the assessment result caused by the distribution shift can be controlled within the preset range, thus improving the accuracy of causal effect assessment.
[0025] Other functionalities of the causal effect assessment methods and systems provided in this specification will be partially listed in the following description. The figures and examples presented below will be readily apparent to those skilled in the art. The inventive aspects of the causal effect assessment methods and systems provided in this specification can be fully understood through practice or use of the methods, apparatus, and combinations described in the detailed examples below. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of this specification, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 A schematic diagram illustrating an application scenario of a causal effect assessment system provided according to an embodiment of this specification is shown. Figure 2 A hardware structure diagram of a computing device provided according to an embodiment of this specification is shown; Figure 3 A flowchart illustrating the training of a preset evaluation model in a causal effect evaluation method provided according to an embodiment of this specification is shown. Figure 4 A schematic diagram illustrating the overall training of a preset evaluation model according to an embodiment of this specification is shown; and Figure 5A flowchart of a causal effect assessment method provided according to an embodiment of this specification is shown. Detailed Implementation
[0028] The following description provides specific application scenarios and requirements for this specification, intended to enable those skilled in the art to make and use the contents of this specification. Various partial modifications to the disclosed embodiments will be apparent to those skilled in the art, and the general principles defined herein can be applied to other embodiments and applications without departing from the spirit and scope of this specification. Therefore, this specification is not limited to the embodiments shown, but rather to the widest scope consistent with the claims.
[0029] The terminology used herein is for the purpose of describing particular exemplary embodiments only and is not restrictive. For example, unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “the” used herein may also include the plural forms. When used in this specification, the terms “comprising,” “including,” and / or “containing” mean that the associated integers, steps, operations, elements, and / or components are present, but do not exclude the presence of one or more other features, integers, steps, operations, elements, components, and / or groups, or that other features, integers, steps, operations, elements, components, and / or groups may be added to the system / method.
[0030] Considering the following description, these and other features of this specification, as well as the operation and function of the related components of the structure, and the economy of assembly and manufacture of the parts, can be significantly improved. All of these form part of this specification with reference to the accompanying drawings. However, it should be clearly understood that the drawings are for illustrative and descriptive purposes only and are not intended to limit the scope of this specification. It should also be understood that the drawings are not drawn to scale.
[0031] The flowcharts used in this specification illustrate operations implemented according to some embodiments of this specification. It should be clearly understood that the operations in the flowcharts may not be implemented in a sequential order. Instead, the operations may be implemented in reverse order or simultaneously. Furthermore, one or more additional operations may be added to the flowcharts. One or more operations may be removed from the flowcharts.
[0032] For ease of description, the terms that will appear in the following descriptions will be explained as follows: Treatment effect estimation aims to study the impact of one or more interventions. For example, it can be used to study how a specific individual's behavioral patterns change before and after receiving one or more interventions. If the individual is a student and the intervention is tutoring, treatment effect estimation in this scenario would be understood as assessing the impact of tutoring on student performance. Similarly, if the individual is a consumer and the intervention is advertising, treatment effect estimation in this scenario would be understood as assessing the impact of advertising on consumer purchasing behavior.
[0033] Distribution shift: During model training and deployment, training and test data are independently sampled from different distributions, causing a shift in the test data relative to the training data. Traditional machine learning follows the independent and identically distributed (IOD) assumption, meaning that training and test data are independently sampled from the same distribution. However, in reality, the testing environment often differs from the training environment, resulting in a distribution shift in the test data relative to the training data. For example, an investment risk model trained on February's financial credit product data might be used to predict financial credit products in May. Similarly, a model trained on data from one bank might be deployed to another bank. Because the IOD assumption in machine learning is broken, the model deployed in the new environment often experiences a performance degradation.
[0034] Density ratio estimation: estimating the density ratio between training and test data. The density ratio can be understood as the ratio of the probability that randomly sampled data comes from the training or test data. Density ratio estimation is a common method for correcting distribution bias. By estimating the density ratio between training and test data and then weighting the samples, distribution bias can be corrected.
[0035] Uncertainty estimation involves quantifying the uncertainty of a model's predictions. Typically, the uncertainty value can be used to determine the uncertainty of the prediction. For example, the uncertainty can be quantified using prediction probabilities, or other quantification methods can be employed. Uncertainty estimation is an important component of Lupin's machine learning approach.
[0036] Figure 1This diagram illustrates an application scenario of a causal effect assessment system 001 provided according to an embodiment of this specification. The causal effect assessment system 001 (hereinafter referred to as System 001) can be applied to assess causal effects in any scenario requiring decision-making based on causal effects, such as causal effect assessment in drug efficacy evaluation, causal effect assessment in advertising push scenarios, causal effect assessment in financial or credit scenarios, etc. Figure 1 As shown, system 001 may include target user 100, client 200, server 300 and network 400.
[0037] The target user 100 can be the user who triggers the identification of causal effects, and the target user 100 can perform the evaluation of causal effects on the client 200.
[0038] Client 200 can be a device for performing causal effect assessment in response to an assessment operation by target user 100. In some embodiments, the causal effect assessment method can be executed on client 200. In this case, client 200 may store data or instructions for performing the causal effect assessment method described herein, and may execute or be used to execute said data or instructions. In some embodiments, client 200 may include a hardware device with data information processing capabilities and the necessary programs required to drive the hardware device to operate. Figure 1As shown, client 200 can communicate with server 300. In some embodiments, server 300 can communicate with multiple clients 200. In some embodiments, client 200 can interact with server 300 through network 400 to receive or send messages, such as receiving or sending object data of a target object. In some embodiments, client 200 may include mobile devices, tablets, laptops, built-in devices in motor vehicles, or similar content, or any combination thereof. In some embodiments, the mobile device may include smart home devices, smart mobile devices, virtual reality devices, augmented reality devices, or similar devices, or any combination thereof. In some embodiments, the smart home device may include smart TVs, desktop computers, etc., or any combination thereof. In some embodiments, the smart mobile device may include smartphones, personal digital assistants, gaming devices, navigation devices, etc., or any combination thereof. In some embodiments, the virtual reality device or augmented reality device may include virtual reality headsets, virtual reality glasses, virtual reality patches, augmented reality headsets, augmented reality glasses, augmented reality patches, or similar content, or any combination thereof. For example, the virtual reality device or the augmented reality device may include Google Glass, head-mounted displays, VR, etc. In some embodiments, the built-in device in the motor vehicle may include an in-vehicle computer, an in-vehicle TV, etc. In some embodiments, client 200 may include a data acquisition device for acquiring object data of a target object. In some embodiments, client 200 may be a device with positioning technology for locating the position of client 200.
[0039] In some embodiments, the client 200 may have one or more applications (APPs) installed. The APPs provide the target user 110 with the ability and interface to interact with the outside world via the network 400. The APPs include, but are not limited to: web browser APPs, search APPs, chat APPs, shopping APPs, video APPs, financial management APPs, instant messaging tools, email clients, social media platform software, etc. In some embodiments, the client 200 may have a target APP installed. The target APP can collect relevant data about the target object for the client 200, thereby obtaining object data. In some embodiments, the target object 100 can also trigger a causal effect assessment request through the target APP. The target APP can respond to the causal effect assessment request and execute the causal effect assessment method described in this specification. The causal effect assessment method will be described in detail later.
[0040] Server 300 may be a server providing various services, such as a backend server supporting object data of target objects collected on client 200. In some embodiments, the causal effect assessment method may be executed on server 300. In this case, server 300 may store data or instructions for executing the causal effect assessment method described herein, and may execute or be used to execute said data or instructions. In some embodiments, server 300 may include hardware devices with data processing capabilities and necessary programs to drive the hardware devices. Server 300 may communicate with multiple clients 200 and receive data sent by clients 200.
[0041] Network 400 serves as a medium to provide a communication connection between client 200 and server 300. Network 400 facilitates the exchange of information or data. For example... Figure 1 As shown, client 200 and server 300 can connect to network 400 and transmit information or data to each other through network 400. In some embodiments, network 400 can be any type of wired or wireless network, or a combination thereof. For example, network 400 may include cable networks, wired networks, fiber optic networks, telecommunications networks, intranets, the Internet, local area networks (LANs), wide area networks (WANs), wireless local area networks (WLANs), metropolitan area networks (MANs), public switched telephone networks (PSTNs), Bluetooth networks, ZigBee networks, near field communication (NFC) networks, or similar networks. In some embodiments, network 400 may include one or more network access points. For example, network 400 may include wired or wireless network access points, such as base stations or Internet switching points, through which one or more components of client 200 and server 300 can connect to network 400 to exchange data or information.
[0042] It should be understood that Figure 1 The number of clients 200, servers 300, and networks 400 shown is merely illustrative. Depending on implementation needs, there can be any number of clients 200, servers 300, and networks 400.
[0043] It should be noted that the causal effect evaluation method can be executed entirely on the client 200, entirely on the server 300, or partially on the client 200 and partially on the server 300.
[0044] Figure 2A hardware structure diagram of a computing device 600 according to an embodiment of this specification is shown. The computing device 600 can execute the causal effect evaluation method described in other parts of this specification. When the causal effect evaluation method is executed on a client 200, the computing device 600 can be the client 200. When the causal effect evaluation method is executed on a server 300, the computing device 600 can be the server 300. When the causal effect evaluation method can be executed partly on the client 200 and partly on the server 300, the computing device 600 can be both the client 200 and the server 300.
[0045] like Figure 2 As shown, the computing device 600 may include at least one storage medium 630 and at least one processor 620. In some embodiments, the computing device 600 may also include a communication port 650 and an internal communication bus 610. Additionally, the computing device 600 may include I / O components 660.
[0046] The internal communication bus 610 can connect different system components, including storage medium 630, processor 620 and communication port 650.
[0047] I / O component 660 supports input / output between computing device 600 and other components.
[0048] Communication port 650 is used for data communication between computing device 600 and external sources. For example, communication port 650 can be used for data communication between computing device 600 and network 400. Communication port 650 can be a wired communication port or a wireless communication port.
[0049] Storage medium 630 may include a data storage device. The data storage device may be a non-transitory storage medium or a temporary storage medium. For example, the data storage device may include one or more of a disk 632, a read-only storage medium (ROM) 634, or a random access storage medium (RAM) 636. Storage medium 630 also includes at least one set of instructions stored in the data storage device. The instructions are computer program code, which may include programs, routines, objects, components, data structures, procedures, modules, etc., that execute the causal effect assessment methods provided in this specification.
[0050] At least one processor 620 can be communicatively connected to at least one storage medium 630 and a communication port 650 via an internal communication bus 610. The at least one processor 620 is used to execute the at least one instruction set described above. When the computing device 600 is running, the at least one processor 620 reads the at least one instruction set and, according to the instructions of the at least one instruction set, executes the causal effect evaluation method provided in this specification. The processor 620 can perform all the steps included in the causal effect evaluation method. The processor 620 can be in the form of one or more processors. In some embodiments, the processor 620 may include one or more hardware processors, such as a microcontroller, microprocessor, reduced instruction set computer (RISC), application-specific integrated circuit (ASIC), application-specific instruction set processor (ASIP), central processing unit (CPU), graphics processing unit (GPU), physical processing unit (PPU), microcontroller unit, digital signal processor (DSP), field-programmable gate array (FPGA), advanced RISC machine (ARM), programmable logic device (PLD), any circuit or processor capable of performing one or more functions, or any combination thereof. For illustrative purposes only, only one processor 620 is described in this specification for the computing device 600. However, it should be noted that the computing device 600 in this specification may also include multiple processors. Therefore, the operation and / or method steps disclosed in this specification may be executed by one processor as described in this specification, or they may be executed jointly by multiple processors. For example, if the processor 620 of the computing device 600 in this specification executes steps A and B, it should be understood that steps A and B may also be executed jointly or separately by two different processors 620 (e.g., the first processor executes step A, the second processor executes step B, or the first and second processors jointly execute steps A and B).
[0051] Figure 3 A flowchart illustrating the training of a preset evaluation model in a causal effect evaluation method P100 provided according to an embodiment of this specification is shown. As previously described, the computing device 600 can execute the causal effect evaluation method P100 of this specification. Specifically, the processor 620 can read an instruction set stored in its local storage medium and then execute the causal effect evaluation method P100 of this specification according to the specifications of the instruction set. Figure 3 As shown, method P100 may include: S110: Acquire training data and determine the density ratio between the target domain data and the source domain data in the training data.
[0052] Training data can include target domain data and source domain data. Target domain data can be understood as data within the target domain, and source domain data as data within the source domain. The target domain differs from the source domain. Source domain data can be understood as data collected after applying or not applying a pre-set intervention. This source domain data can include the feature values of the training samples, the intervention labels corresponding to the pre-set intervention for the training samples, and the response values. Target domain data includes unlabeled samples from the target domain, meaning it includes the feature values of the training samples but does not contain the intervention labels and response values corresponding to the pre-set intervention. The similarity between the feature distribution of the target domain data and the feature distribution of the object data exceeds a pre-set similarity threshold. Object data can include test data or input data for the evaluation model obtained after training. For example, if the object data is data from a specific patient in a hospital, the target domain data could include data from the same or different patients in the same hospital. Or, if the object data is anonymized data from a specific customer of a bank, the target domain data could include anonymized data from the same bank or customers of the same type within the same bank. In this case, the feature distribution of the target domain data can be relatively close to future test data or input data.
[0053] The intervention marker can include a marker indicating that a pre-defined intervention has been applied and a marker indicating that no intervention has been applied. Taking a binary marker as an example, the marker indicating that a pre-defined intervention has been applied can be w=1, and the marker indicating that no intervention has been applied can be w=0.
[0054] The density ratio can be the ratio between the target domain data and the source domain data. It can be understood as the ratio between the probability that a randomly sampled training sample comes from the target domain data and the probability that it comes from the source domain data. Since the feature distribution of the target domain data is similar to that of the test data, this density ratio can also characterize the sample distribution information between the training data (equivalent to the source domain data) and the test data (equivalent to the target domain data). Based on this sample distribution information, the distribution bias can be corrected, thereby improving the evaluation accuracy of the causal effect assessment model.
[0055] There are several ways to obtain training data, including the following: For example, the processor 620 can acquire source domain data corresponding to preset intervention measures, acquire preset sample data corresponding to the target object, select target domain data from the preset sample data, and use the source domain data and target domain data as training data, as follows: S111: Obtain source domain data corresponding to preset intervention measures In this context, a pre-set intervention can be understood as a pre-defined intervention. The number of pre-set interventions can be one or more, and can be set according to the actual application. An intervention can be understood as a measure that intervenes in a target. For example, if a user lacks proficiency in a certain skill, and the user participates in training for that skill, then participating in that skill training can be considered an intervention. Similarly, if a patient has a disease and is given medication A for that disease, then taking medication A can be considered an intervention. Therefore, causal effect assessment can be understood as assessing the impact of applying the intervention. Taking the response value after intervention as y1 and the response value without intervention as y2 as an example, the effect can be y1 - y2. In specific application scenarios, taking participation in skill training as an example, the impact of applying the intervention could include the user's proficiency in that skill; or taking medication A as an example, the impact could include the patient's recovery from the disease or the efficacy of medication A.
[0056] There are several ways to obtain the source data corresponding to the preset interference measures. For example, the processor 620 can obtain the source data corresponding to the preset intervention measures from completely randomized experimental data. Alternatively, since completely randomized experiments are often expensive and difficult to implement, in order to reduce the difficulty and cost of obtaining source data, the source data corresponding to the preset intervention measures can also be extracted from historical observation data, as follows: (1) Obtain source data corresponding to the pre-set intervention measures from the completely randomized trial data. In this context, completely randomized trial data can be understood as data collected after conducting a completely randomized trial by applying a pre-defined intervention. A completely randomized trial may involve randomly selecting a portion of the samples as the experimental group, intervening in this portion of the samples, and collecting their response values. Similarly, another portion of the samples may be randomly selected as the control group, which will not be intervened in, and their response values will be collected.
[0057] There are several ways to obtain source data corresponding to the pre-set intervention in completely randomized trial data, including the following: For example, the processor 620 acquires a set of candidate objects, selects experimental objects and control objects from the set of candidate objects, acquires the response data of the experimental objects after the application of preset intervention measures, obtains the experimental group sample data, acquires the response data of the control objects after the application of preset intervention measures, obtains the control group sample data, and uses the experimental group sample data and the control group sample data as source data.
[0058] The experimental subjects include at least one candidate subject to which a preset intervention is applied. There are several ways to obtain the response data of the experimental subjects after the preset intervention is applied. For example, the processor 620 can directly apply the preset intervention to the experimental subject and obtain its response data, acquire the subject's features, and use the subject's features, the intervention marker corresponding to the preset intervention, and the subject's response data as experimental group sample data. Alternatively, the experimental subject can be sent to an experimental server so that the server can apply the preset intervention to the subject, receive the response data returned by the server, acquire the subject's features, and use the subject's features, the intervention marker corresponding to the preset intervention, and the subject's response data as experimental group sample data.
[0059] The control group includes at least one candidate subject who did not receive the pre-defined intervention. The method for obtaining the control group sample data is similar to that for obtaining the experimental group sample data; the difference is that the response data in the control group sample data is the response data after the pre-defined intervention was not applied. The method for obtaining the control group sample data is described above and will not be repeated here.
[0060] After obtaining the experimental group sample data and the control group sample data, the experimental group sample data and the control group sample data can be used as source domain data.
[0061] It should be noted that causal effect estimation is best applied to completely randomized trials. However, completely randomized trials are often expensive and difficult to implement, making the acquisition of data from them both costly and challenging. In such cases, an alternative is to use historical observational data (observational data) to obtain the source data, as shown below: (2) Extract the source data corresponding to the preset intervention measures from the historical observation data. Historical observational data can include data observed after a pre-defined intervention was applied or not applied. For example, if the pre-defined intervention is administering drug A to treat disease B, the historical observational data could include data observed in one or more hospitals after patients with disease B took drug A and after they did not. Compared to completely randomized trial data, historical observational data can have a larger data scale and lower collection costs, thereby improving the efficiency of causal effect assessment.
[0062] There are several ways to extract the source data corresponding to the preset intervention measures from historical observation data, including the following: For example, the processor 620 can acquire historical observation data, extract the response data of the experimental subjects from the historical observation data to obtain experimental group sample data, extract the response data of the control subjects from the historical observation data to obtain control group sample data, and use the experimental group sample data and control group sample data as source domain data.
[0063] The experimental subjects include at least one object to which a preset intervention is applied. There are several ways to extract the response data of the experimental subjects from historical observation data. For example, the processor 620 can obtain the object index corresponding to the historical observation data, and based on the object index, randomly sample a preset number of response data and object features of the experimental subjects from the historical observation data. The intervention marker, response data, and object features corresponding to the applied preset intervention are then used as the experimental group sample data. Alternatively, the processor can obtain the user set corresponding to the historical observation data, filter out the objects to which the preset intervention is applied from the user set to obtain a candidate experimental subject set, randomly sample a preset number of experimental subjects from the candidate experimental subject set, extract the response data and object features corresponding to the experimental subjects from the historical observation data, and use the intervention marker, response data, and object features corresponding to the applied preset intervention as the experimental group sample data.
[0064] The control group includes at least one subject who did not receive the pre-defined intervention. The method for extracting control group sample data from historical observation data is similar to that for extracting experimental group sample data; the difference is that the response data in the control group sample data is the response data after no pre-defined intervention was applied to the control subjects. The methods for obtaining control group sample data are described above and will not be repeated here.
[0065] After extracting the experimental group sample data and the control group sample data, the experimental group sample data and the control group sample data can be used as the source domain data.
[0066] S112: Obtain candidate sample data corresponding to the target object, and select target domain data from the candidate sample data.
[0067] Here, the target object can be understood as the test object or evaluation object of the trained evaluation model. The candidate sample data corresponding to the target object can be understood as sample data originating from the same source as the target object, or, more specifically, sample data with a feature distribution similar to that of the target object. Taking patients from a specific hospital as an example, the preset sample data could include patient data from the same hospital, or patient data from hospitals the patient has previously visited, and so on. In this case, the feature distribution of the preset sample data can be close to or similar to the feature distribution of the test data.
[0068] There are several ways to obtain candidate sample data corresponding to the target object, as follows: For example, the processor 620 can directly obtain candidate sample data corresponding to the target object, or it can obtain object information of the target object and obtain candidate sample data corresponding to the target object based on the object information, or it can obtain the data source of the object data of the target object and obtain candidate sample data corresponding to the target object based on the data source.
[0069] The object information may include object attribute information and historical behavior information. Based on this object information, there are multiple ways to obtain candidate sample data corresponding to the target object. For example, the processor 620 can extract the object attribute information and historical behavior information of the target object from the object information, and obtain sample data related to the target object based on the object attribute information and historical behavior information, thereby obtaining the candidate sample data corresponding to the target object.
[0070] After obtaining the candidate sample data corresponding to the target object, the target domain data can be selected from the candidate sample data. There are several ways to select the target domain data. For example, the processor 620 can randomly sample a preset number of sample data from the candidate sample data to obtain the target domain data. Alternatively, it can extract the sample features of each candidate sample from the candidate sample data, obtain the object features of the target object, and calculate the similarity between the sample features of each candidate sample and the object features. Based on this similarity, at least one target sample is selected from the candidate samples, and the sample data corresponding to at least one target sample is filtered from the candidate sample data to obtain the target domain data.
[0071] It should be noted that the number of data points in the target domain data and the source domain data can be the same or different. The number of samples in the target domain data and the source domain data can also be the same or different.
[0072] S113: Use source domain data and target domain data as training data.
[0073] For example, after selecting source domain data and target domain data, processor 620 can directly use the source domain data and target domain data as training data. Alternatively, it can obtain the first sample number of the source domain data and the second sample number of the target domain data, adjust the first sample number and the second sample number based on a preset ratio, obtain the target first sample number and the target second sample number in the training data, and adjust the source domain data and the target domain data based on the target first sample number and the target second sample number so that the ratio between the source domain data and the target domain data is the preset ratio, thereby obtaining the training data.
[0074] After obtaining the training data, the density ratio between the target domain data and the source domain data in the training data can be determined.
[0075] S114: Determine the density ratio between the target domain data and the source domain data in the training data.
[0076] For example, the processor 620 can obtain the sampling probability of training samples in the target domain data to obtain the target domain sampling probability, obtain the sampling probability of training samples in the source domain data to obtain the source domain sampling probability, and determine the ratio of the target domain sampling probability to the source domain sampling probability to obtain the density ratio.
[0077] There are several ways to obtain the target domain sampling probability and the source domain sampling probability, and determine the density ratio based on the target domain sampling probability and the source domain sampling probability. For example, the processor 620 can use a density ratio estimation algorithm to estimate the density ratio between the target domain data and the source domain data.
[0078] There can be various types of density ratio estimation algorithms, such as kernel mean matching (KMM), least squares importance fitting (LSIF), or any other algorithm that can estimate the density ratio.
[0079] S120: Based on the source domain data, determine the current pseudo-label corresponding to the training data.
[0080] The pseudo-labels here include pseudo-labels for the causal effect values corresponding to the training samples in the training data. A pseudo-label can also be understood as a pseudo-tag, which is a label that is generated after unlabeled data is labeled using a supervised learning network. Since causal effect values are not directly observable data, they can be indirectly represented by pseudo-labels. The source domain data includes experimental group sample data and control group sample data. Based on the source domain data, there are several ways to determine the current pseudo-label corresponding to the training data, as follows: For example, the processor 620 can train a preset regression network based on experimental group sample data to obtain an experimental group regression network, train a preset regression network based on control group sample data to obtain a control group regression network, and determine the current pseudo-label corresponding to the training data based on the experimental group regression network and the control group regression network, as follows: S121: Based on the experimental group sample data, train the preset regression network to obtain the experimental group regression network.
[0081] The preset regression network can be a pre-defined regressor. A regressor can be understood as a model with a regression algorithm. A regression algorithm is a class of algorithms that attempts to explore the relationship between variables by measuring error. Common regression algorithms include least squares (linear regression), logistic regression, stepwise regression, and multivariate adaptive regression splines. The type of regressor can be various, such as tree models, neural networks, or other types of regressors.
[0082] There are several ways to train the pre-defined regression network based on the experimental group sample data, as follows: For example, the processor 620 can extract the sample features and corresponding response values of the experimental group samples from the experimental group sample data, and train a preset regression network based on the sample features and response values to obtain the experimental group regression network.
[0083] S122: Based on the control group sample data, the preset regression network is trained to obtain the control group regression network.
[0084] For example, the processor 620 can extract the control sample features and the corresponding control response values of the control sample features from the control sample data, and train the preset regression network based on the control sample features and the control response values to obtain the experimental group regression network.
[0085] It should be noted that the regression network of the control group and the regression network of the experimental group can be regression networks obtained by training with the same type or the same preset regression network.
[0086] S123: Based on the regression networks of the experimental group and the control group, determine the current pseudo-label corresponding to the training data.
[0087] For example, the processor 620 can extract the sample data of the training samples from the training data, input the sample data into the experimental group regression network to obtain the experimental group regression value of the training samples, input the sample data into the control group regression network to obtain the control group regression value of the training samples, and determine the difference between the experimental group regression value and the control group regression value, and use the difference as a pseudo-label of the causal effect of the training samples.
[0088] The training samples can include source domain samples from the source domain data and target domain samples from the target domain data. The source domain samples can include experimental group samples and control samples. The sample data of the source domain samples can include sample features, intervention labels, and response values, while the sample data of the target domain samples can include sample features.
[0089] There are several ways to determine the difference between the regression values of the experimental group and the control group, such as using the training samples as... control group regression network The output control group regression value is The experimental group regression network The output of the experimental group regression value is For example, the regression value of the experimental group can be calculated directly. The regression value compared with the control group was The difference is used to obtain the training samples. The pseudo-label of the causal effect can be specifically shown in formula (1):
[0090] in, As training samples, This serves as a pseudo-label for the causal effect value of the training sample. The regression values for the experimental group of the training samples. The regression value is the control group value for the training samples.
[0091] S130: Based on the density ratio and the current pseudo-label, train the preset evaluation model to obtain the evaluation model.
[0092] The preset evaluation model can be a pre-defined evaluation model, which is an initial model that has not been trained.
[0093] There are several ways to train the pre-defined evaluation model based on the density ratio and the current pseudo-label, as follows: For example, processor 620 can determine the uncertainty value of the current pseudo-label, weight the training sample data based on the uncertainty value and density ratio, and train a preset evaluation model based on the current pseudo-label and the weighted sample data to obtain the evaluation model, as follows: S131: Determine the uncertain value of the current pseudo-marker.
[0094] The uncertainty value can include a value representing the degree of truth of the current pseudo-label. The larger the uncertainty value, the lower the degree of truth of the current pseudo-label corresponding to that uncertainty value. The uncertainty value can be represented in various forms, such as uncertainty probability, a specific value corresponding to uncertainty, or any other value that can represent the degree of uncertainty.
[0095] There are several ways to determine the uncertainty value of the current pseudo-label, such as the following: For example, the processor 620 can use an uncertainty quantization algorithm to determine the uncertainty value of the current pseudo-label, or it can obtain the regression probability of the experimental group corresponding to the regression value of the experimental group and the regression probability of the control group corresponding to the regression value of the control group, determine the regression probability of the current pseudo-label based on the regression probability of the experimental group and the regression probability of the control group, and convert the regression probability into the uncertainty value of the current pseudo-label.
[0096] Among them, there can be multiple types of uncertainty quantization algorithms, such as MC Dropout (an uncertainty algorithm), ensemble (an uncertainty algorithm), or any algorithm that can quantify uncertainty.
[0097] The regression probability of the experimental group is used to characterize the true nature of the regression values of the experimental group. The regression probability of the control group is used to characterize the true nature of the regression values of the control group. The regression probability of the current pseudo-label is used to characterize the true nature of the current pseudo-label. There are several ways to determine the regression probability of the current pseudo-label based on the regression probabilities of the experimental group and the control group. For example, the processor 620 can directly fuse the regression probabilities of the experimental group and the control group to obtain the regression probability of the current pseudo-label. Alternatively, it can obtain a regression weighting coefficient, and based on this coefficient, weight the regression probabilities of the experimental group and the control group respectively to obtain the weighted regression probabilities of the experimental group and the control group. Finally, it can fuse the weighted regression probabilities of the experimental group and the control group to obtain the regression probability of the current pseudo-label.
[0098] After determining the regression probability of the current pseudo-label, it can be converted into the uncertainty value of the current pseudo-label. There are several ways to do this conversion. For example, the processor 620 can directly use the regression probability as the uncertainty value of the current pseudo-label, or it can calculate the difference between the regression probability and the probability of 1 and use this difference as the uncertainty value of the current pseudo-label.
[0099] S132: Weight the sample data of the training samples based on the uncertainty value and density ratio.
[0100] For example, the processor 620 can select target training samples from the training samples based on the uncertainty value, determine the evaluation weight of the target training samples based on the uncertainty value and the density ratio, and weight the sample data of the target training samples based on the evaluation weight to obtain weighted sample data.
[0101] There are several ways to select target training samples from the training samples based on uncertainty values. For example, the processor 620 can select training samples with uncertainty values less than a preset uncertainty threshold to obtain target training samples. It should be noted that the selected target training samples can include training samples with high pseudo-label fidelity, thereby making the preset evaluation model training process more robust.
[0102] After selecting the target training samples, the evaluation weights of the target training samples can be determined based on the uncertainty value and density ratio. The evaluation weight can be understood as a sample-level weighting of the training samples, ensuring the balance between the source and target domain data during training, making the trained evaluation model insensitive to distribution shifts. There are several ways to determine the evaluation weights of the target training samples. For example, the processor 620 can extract the target uncertainty value corresponding to the target training sample from the uncertainty value, obtain the evaluation weight parameter corresponding to the target uncertainty value, extract the target density ratio corresponding to the target training sample from the density ratio, and fuse the evaluation weight parameter and the target density ratio to obtain the evaluation weight of the target training sample.
[0103] The evaluation weight parameter can be understood as the parameter that determines the evaluation weight, and this parameter is indicated by an indicator function. To determine this, there are several ways to obtain the evaluation weight parameters corresponding to the target uncertainty value. For example, the processor 620 can use an indicator function. The evaluation weight parameters corresponding to the target uncertainty value are determined as shown in formula (2):
[0104] in, For the target training samples, The evaluation weight parameters for the target training samples. The uncertainty value of the target training sample. To preset an uncertainty threshold, This can represent the target uncertainty value of the target training sample.
[0105] After obtaining the evaluation weight parameters and target density ratio of the target training sample, the evaluation weight parameters and target density ratio can be fused to obtain the evaluation weight of the target training sample. There are several ways to fuse the evaluation weight parameters and target density ratio. For example, the processor 620 can directly multiply the evaluation weight parameters and target density ratio to obtain the evaluation weight of the target training sample, as shown in formula (3):
[0106] in, Let be the target training sample, and y be the evaluation weight of the target training sample. The target density ratio of the training samples. The evaluation weight parameters for the target training samples.
[0107] After determining the evaluation weights of the target training samples, the sample data of the target training samples can be weighted based on the evaluation weights. There are various weighting methods. For example, the processor 620 can directly weight the evaluation weights of the target training samples with the sample data of the target training samples to obtain the weighted sample data of the target training samples.
[0108] S133: Based on the current pseudo-labels and weighted sample data, train the preset evaluation model to obtain the evaluation model.
[0109] For example, the processor 620 can input the weighted sample data into a preset evaluation model to obtain the predicted causal effect value of the target training sample, select the target pseudo-label corresponding to the target training sample from the current pseudo-labels, and determine the target loss information of the target training sample based on the predicted causal effect value and the target pseudo-label, and converge the preset evaluation model based on the target loss information to obtain the evaluation model.
[0110] The target loss information can be understood as the loss information obtained after the preset evaluation model predicts the causal effect of the target training sample. The loss information can be understood as the difference between the predicted value of the preset evaluation model and the labeled value of the target training sample, or any other information that can characterize the difference between the prediction and the pre-training labeled information. There are multiple ways to determine the target loss information of the target training sample based on the predicted causal effect value and the target pseudo-label. For example, the processor 620 can directly calculate the effect difference between the predicted causal effect value and the causal effect value corresponding to the target pseudo-label, and use this effect difference as the target loss information of the target training sample. Alternatively, other types of loss functions can be used to determine the target loss information of the target training sample based on the predicted causal effect value and the target pseudo-label.
[0111] The loss function can be of various types, such as mean squared error loss function, mean absolute error loss function, cross-entropy loss function, or other loss functions.
[0112] After determining the target loss information for the target training samples, the pre-defined evaluation model can be converged based on this information to obtain the evaluation model. There are several ways to converge the pre-defined evaluation model. For example, the processor 620 can use gradient descent to update the network parameters of the pre-defined evaluation model based on the target loss information. Alternatively, other convergence algorithms can be used to update the network parameters of the pre-defined evaluation model based on the target loss information to obtain the evaluation model.
[0113] This scheme proposes a two-stage learning strategy that can directly model causal effects. The process of training the pre-defined evaluation model can be as follows: Figure 4 As shown, the entire training process can include two stages. One stage involves training the regression network and determining pseudo-labels based on the regression network. The other stage involves training a pre-defined evaluation model. A data preparation stage can also be included before the first stage, which can be as follows: (1) Preparation stage: The training data is divided into two groups: source domain data and target domain data. The source domain data includes control group sample data and experimental group sample data. The intervention label in the control group sample data is 0, which means that no preset intervention measures were applied. The intervention label in the experimental group sample data is 1, which means that the preset intervention measures were applied. Determine the density ratio of the target domain data to the source domain data. .
[0114] (2) First stage: Train the control group regression network by using the sample features and corresponding response values in the control group sample data. The experimental group regression network was trained using the sample features and their corresponding response values from the experimental group sample data. All training data (including source domain data and target domain data) were input into the control group regression network and the experimental group regression network, respectively. The difference between the outputs of the two regression networks was used as a pseudo-label of the causal effect value corresponding to the training sample. Then, the uncertainty value of the pseudo-label can be determined using uncertainty quantification techniques. .
[0115] (3) Second stage: Based on the sample features (including the source domain and the target domain) and the pseudo-labels of the corresponding causal effects, the preset evaluation model is trained to obtain the evaluation model. During the training process, evaluation weights are used to weight the samples at the sample level. The evaluation weights are determined by the density ratio and the uncertainty value, as shown in formula (3). Training samples with uncertainty values less than the preset uncertainty threshold are selected as target training samples and participate in the training. Therefore, the evaluation weight parameters of training samples with uncertainty values greater than the preset uncertainty threshold can be set to 0, and the evaluation weight parameters of training samples with uncertainty values less than the preset uncertainty threshold can be set to 1.
[0116] It should be noted that this scheme generates pseudo-labels for causal effect values in the target domain data and directly applies the target domain data to the training process, enabling the evaluation model to bridge the distribution differences between the training and test data. Furthermore, this scheme utilizes density ratio estimation techniques to obtain evaluation weights (sample weights), which are then incorporated into the training of the pre-defined evaluation model in the second stage to mitigate the distribution bias between the training and test data, thereby improving the evaluation accuracy of the model under distribution bias conditions. Finally, through the organic integration of density ratio domain uncertainty quantification, the model provides both pseudo-labels for causal effect values and corresponding uncertainty values, making the training process of the evaluation model more robust and further improving the accuracy of causal effect evaluation.
[0117] After training the pre-defined evaluation model to obtain the evaluation model, causal effect assessment can be performed based on the evaluation model. Figure 5 A flowchart of a causal effect assessment method P100 provided according to an embodiment of this specification is shown. As previously described, computing device 600 can execute the causal effect assessment method P100 of this specification. Specifically, processor 620 can read an instruction set stored in its local storage medium and then execute the causal effect assessment method P100 of this specification according to the instructions in the instruction set. Figure 5 As shown, method P100 may also include: S140: Retrieve object data of the target object.
[0118] The target group refers to the object that needs to be assessed for causal effects. For example, in a drug testing scenario where causal effect assessment is used, the target group could be at least one patient suffering from a specific disease.
[0119] Object data can be understood as data related to the target object. Object data can include object attribute data, object behavior data, and so on.
[0120] There are several ways to obtain the object data of the target object, as follows: For example, processor 620 can directly obtain object data of the target object uploaded by target user 100 through the terminal, or it can obtain object data of the target object from the network or database.
[0121] S150: Input the object data into the evaluation model to obtain the target causal effect value of the target object under the preset intervention measures.
[0122] Specifically, the evaluation model is insensitive to the distribution shift between the object data and the training data. Insensitivity means that while there is a distribution shift between the object data and the training data, the evaluation model's error in the evaluation result caused by the distribution shift is within a preset range.
[0123] The preset range can include any one of 1%, 3%, 5%, 10%, 15%, or 20%.
[0124] There are several ways to input object data into the evaluation model to obtain the target causal effect value of the target object under the preset intervention measures, as follows: For example, the processor 620 can directly input object data into the evaluation model, extract the causal effect characteristics of the target object from the object data through the evaluation model, predict the causal effect value corresponding to the target object based on the causal effect characteristics, and use the causal effect value as the causal effect value of the target object under the preset intervention measures.
[0125] S160: Output the target causal effect value.
[0126] For example, the processor 620 can directly visualize the target causal effect value, or it can send the target causal effect value to the target terminal or decision server, and so on.
[0127] There are various ways to visualize the results. For example, the target causal effect value can be displayed directly, or an audio / visual prompt can be given when the target causal effect value exceeds the preset causal effect value.
[0128] After outputting the target causal effect value, decisions can be made based on this value. There are several ways to make these decisions. For example, the processor 620 can intervene in the target object using preset intervention measures when the target causal effect value exceeds a preset causal effect threshold. Alternatively, the target causal effect value can be sent to a decision server so that the server can intervene in the target object using preset intervention measures when the target causal effect value exceeds the preset causal effect threshold.
[0129] There are various intervention measures. For example, if the target group is a patient with disease A, and the preset intervention is treatment measure B for treating disease A, then if the target causal effect value exceeds the preset causal effect threshold, it can be understood that the treatment effect of treatment measure B on disease A meets expectations. Therefore, treatment measure B can be used to treat patients with disease A. Another example is if the preset intervention is attending a training course, and the target group is workers with poor skills, then if the target causal effect value exceeds the preset causal effect threshold, it can be understood that the training course can improve the workers' skill level within a preset time. Therefore, workers with poor skills can attend the training course for skills training.
[0130] The application of this causal effect assessment method is very extensive. The following example illustrates the specific application of the causal effect assessment method in the disease treatment scenario.
[0131] In a disease treatment scenario, taking a specialized hospital as the training environment for the pre-set evaluation model, a general hospital as the deployment environment, patients with disease A as the training samples and target subjects, and treatment B for disease A as the pre-set intervention, the different deployment environments often lead to distributional shifts in the test or usage data. In this solution, training the pre-set evaluation model for the disease treatment scenario mainly consists of three stages: (1) Preparation stage Acquire historical observation data of patients with disease A from specialized hospitals. This historical observation data may include patient attribute information and observation information after treatment. Randomly select data from the historical observation data of patients treated with treatment measure B (attribute data and disease data after treatment with treatment measure B, etc.), and add an intervention marker indicating treatment measure B to the data to obtain the experimental group sample data. Randomly select data from the historical observation data of patients who did not receive treatment measure B (attribute data and disease data after treatment without treatment measure B, etc.), and add an intervention marker indicating no treatment with treatment measure B to the data to obtain the control group sample data. Use the experimental group sample data and the control group sample data as the source domain data. Acquire data of patients with disease A from general hospitals or similar general hospitals where deployment is needed, and use this data as the target domain data. Use the source domain data and the target domain data as training data. Determine the density ratio between the target domain data and the source domain data using density ratio estimation algorithms such as KMM or LSIF.
[0132] (2) First stage The first sample feature was extracted from the attribute data of the control group sample data, and the control group regression network was trained using the first sample feature and its corresponding response value (disease data after treatment without treatment B). The second sample feature was extracted from the attribute data of the experimental group sample data, and the regression network of the experimental group was trained using the second sample feature and its corresponding response value (disease data after treatment with treatment measure B). All training data were input into the control group regression network and the experimental group regression network, respectively. The difference between the outputs of the two regression networks was used as a pseudo-label for the causal effect value of treatment B for patient samples with disease A. Then, the uncertainty value of each pseudo-label can be determined using uncertainty quantization algorithms such as MC-dropout or ensemble. The pseudo-label here can be understood as the indirectly observed causal effect value of treating patients with disease A with treatment measure B (or the treatment effect).
[0133] (3) Second stage By using the uncertainty value of the pseudo-label, target patient samples are selected from the patient sample pool. Based on the density ratio of the patient samples and the uncertainty value of the pseudo-label, the evaluation weight of the target patient samples is determined. The method for determining the evaluation weight is described above. Based on this evaluation weight, the sample data (sample features) of the target patient samples can be weighted. Then, the weighted sample data is input into a pre-defined evaluation model to obtain the predicted causal effect value (which can also be understood as the predicted treatment effect) of the target patient samples after treatment measure B. Based on the predicted causal effect value and the causal effect value corresponding to the pseudo-label, the target loss information of the target patient samples can be determined. Then, based on this target loss information, the pre-defined evaluation model is converged to obtain the evaluation model.
[0134] After training the pre-defined evaluation model, target patient data of patients with disease A within a general hospital in the deployment environment can be obtained. Inputting this target patient data into the evaluation model yields the causal effect value (predicted treatment outcome) of the patient if treatment measure B is adopted. This causal effect value is then output.
[0135] When the causal effect value exceeds the preset causal effect threshold, it can be determined that the treatment effect of treatment measure B on disease A is as expected. At this time, treatment measure B can be used to treat patients with disease A in the general hospital.
[0136] It should be noted that, for disease A, multiple evaluation models corresponding to treatment measures can be trained simultaneously. This allows the treatment measure with the best therapeutic effect to be selected from among multiple treatment measures based on the causal effect values corresponding to different treatment measures.
[0137] It should be noted that, in addition to applying causal effect assessment methods to disease treatment scenarios, they can also be applied to disease diagnosis, skills training, and financial lending scenarios, among others. For example, in a disease diagnosis scenario, the training samples and target subjects can be hospital patients, and the pre-set interventions can include multiple disease diagnosis methods. Similarly, in a lending scenario, the training samples and target subjects can be customers needing loans, and the pre-set interventions can include one or more credit rating assessment methods. The specific application processes in different scenarios are similar to those in disease treatment scenarios, as detailed above, and will not be elaborated upon further here.
[0138] In summary, the causal effect assessment method P100 and system 001 provided in this specification acquire object data of the target object, input the object data into the assessment model, obtain the target causal effect value of the target object under the preset intervention measures, and the assessment model is insensitive to the distribution shift between the object data and the training data, and outputs the target causal effect value. Since the assessment model obtained by this scheme is insensitive to the distribution shift between the object data and the training data, the error of the assessment result caused by the distribution shift can be controlled within the preset range, thus improving the accuracy of causal effect assessment.
[0139] This specification, in another aspect, provides a non-transitory storage medium storing at least one set of executable instructions for performing causal effect assessment. When the executable instructions are executed by a processor, they instruct the processor to implement the steps of the causal effect assessment method P100 described in this specification. In some possible embodiments, various aspects of this specification can also be implemented as a program product comprising program code. When the program product is run on a computing device 600, the program code causes the computing device 600 to perform the steps of the causal effect assessment method P100 described in this specification. The program product for implementing the above method may employ a portable compact disk read-only memory (CD-ROM) containing program code and may run on the computing device 600. However, the program product of this specification is not limited thereto. In this specification, a readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system. The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. The computer-readable storage medium may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium may also be any readable medium other than a readable storage medium that can send, propagate, or transmit programs for use by or in connection with an instruction execution system, apparatus, or device. Program code contained on a readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof. Program code for performing the operations described herein can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on computing device 600, partially on computing device 600, as a standalone software package, partially on computing device 600 and partially on a remote computing device, or entirely on a remote computing device.
[0140] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0141] In summary, after reading this detailed disclosure, those skilled in the art will understand that the foregoing detailed disclosure is presented by way of example only and is not restrictive. Although not explicitly stated herein, those skilled in the art will understand that this specification requires various reasonable changes, improvements, and modifications to the embodiments. These changes, improvements, and modifications are intended to be made by this specification and are within the spirit and scope of the exemplary embodiments described herein.
[0142] Furthermore, certain terms in this specification have been used to describe embodiments of this specification. For example, "an embodiment," "an embodiment," and / or "some embodiments" mean that a particular feature, structure, or characteristic described in connection with that embodiment may be included in at least one embodiment of this specification. Therefore, it is to be emphasized and understood that two or more references to "an embodiment" or "an embodiment" or "alternative embodiment" in various parts of this specification do not necessarily refer to the same embodiment. Moreover, specific features, structures, or characteristics may be suitably combined in one or more embodiments of this specification.
[0143] It should be understood that in the foregoing description of the embodiments in this specification, various features are combined in a single embodiment, drawing, or description for the purpose of simplifying the description and aiding in the understanding of a feature. However, this does not mean that the combination of these features is necessary, and those skilled in the art may readily identify some of the devices as separate embodiments when reading this specification. That is, the embodiments in this specification can also be understood as an integration of multiple secondary embodiments. It is also valid when each secondary embodiment contains fewer than all the features of a single foregoing disclosed embodiment.
[0144] Each patent, patent application, publication of the patent application, and other materials such as articles, books, specifications, publications, documents, articles, etc., cited herein may be incorporated by reference. All contents used for all purposes, except for any history of prosecution documents relating to it, that may be inconsistent with or conflict with this document, or any such history of prosecution documents that may have a limiting effect on the widest extent of the claims, are now or hereafter associated with this document. For example, in the event of any inconsistency or conflict between the description, definition, and / or use of terms associated with any of the included materials and the terms, description, definition, and / or used in connection with this document, the terms used herein shall prevail.
[0145] Finally, it should be understood that the embodiments disclosed herein are illustrative of the principles of the embodiments described in this specification. Other modified embodiments are also within the scope of this specification. Therefore, the embodiments disclosed in this specification are merely examples and not limitations. Those skilled in the art can implement the applications described in this specification using alternative configurations based on the embodiments in this specification. Therefore, the embodiments in this specification are not limited to the embodiments precisely described in the applications.
Claims
1. A method for assessing causal effects, comprising: Obtain object data of the target object, wherein the target object is a consumer; The object data is input into the evaluation model to obtain the target causal effect value of the target object under a preset intervention measure, wherein the preset intervention measure is advertising. as well as Output the target causal effect value, which characterizes the impact of advertising on the purchasing behavior of the target audience; wherein... The evaluation model is trained through the following steps: Acquire training data and determine the density ratio between the target domain data and the source domain data in the training data, wherein the source domain data includes experimental group sample data and control group sample data. The current pseudo-labels corresponding to the training data are determined based on the regression networks of the experimental group and the control group. These networks are trained using the sample data from the experimental group and the control group, respectively. The current pseudo-labels include pseudo-labels corresponding to the causal effect values of the training samples in the training data. The preset evaluation model is trained based on the density ratio and the current pseudo-label to obtain the evaluation model.
2. The causal effect assessment method according to claim 1, wherein, The evaluation model is insensitive to the distribution offset between the object data and the training data. This insensitivity includes the following: there is a distribution offset between the object data and the training data, and the evaluation model's evaluation result error caused by the distribution offset is within a preset range.
3. The causal effect assessment method according to claim 2, wherein, The preset range includes any one of 1%, 3%, 5%, 10%, 15%, or 20%.
4. The causal effect assessment method according to claim 1, wherein, The target domain is different from the source domain. The target domain data includes unlabeled samples of the target domain. The similarity between the feature distribution of the target domain data and the feature distribution of the object data exceeds a preset similarity threshold.
5. The causal effect assessment method according to claim 1, wherein, The process of determining the current pseudo-label corresponding to the training data based on the experimental group regression network and the control group regression network includes: Based on the experimental group sample data, the preset regression network is trained to obtain the experimental group regression network. Based on the control group sample data, the preset regression network is trained to obtain the control group regression network; and Based on the regression network of the experimental group and the regression network of the control group, the current pseudo-label corresponding to the training data is determined.
6. The causal effect assessment method according to claim 5, wherein, The step of training a preset regression network based on the experimental group sample data to obtain the experimental group regression network includes: Extract the sample features of the experimental group samples and the corresponding response values from the sample data of the experimental group; and Based on the sample features and the response values, the preset regression network is trained to obtain the experimental group regression network.
7. The causal effect assessment method according to claim 5, wherein, The step of determining the current pseudo-label corresponding to the training data based on the experimental group regression network and the control group regression network includes: Extract the sample data of the training samples from the training data; The sample data is input into the experimental group regression network to obtain the experimental group regression value of the training sample; The sample data is input into the control group regression network to obtain the control group regression values of the training samples, and The difference between the regression values of the experimental group and the regression values of the control group is determined, and the difference is used as a pseudo-label of the causal effect of the training samples.
8. The causal effect assessment method according to claim 1, wherein, The step of training a preset evaluation model based on the density ratio and the current pseudo-label to obtain the evaluation model includes: Determine the uncertainty value of the current pseudo-mark, the uncertainty value including a value characterizing the degree of truth of the current pseudo-mark; Based on the uncertainty value and the density ratio, the sample data of the training samples are weighted; and Based on the current pseudo-label and the weighted sample data, the preset evaluation model is trained to obtain the evaluation model.
9. The causal effect assessment method according to claim 8, wherein, The weighting of the training sample data based on the uncertainty value and the density ratio includes: Based on the uncertainty value, a target training sample is selected from the training samples; Based on the uncertainty value and the density ratio, the evaluation weights of the target training samples are determined; and Based on the evaluation weights, the sample data of the target training samples are weighted to obtain the weighted sample data.
10. The causal effect assessment method according to claim 9, wherein, Determining the evaluation weights of the target training samples based on the uncertainty value and the density ratio includes: Extract the target uncertainty value corresponding to the target training sample from the uncertainty value; Obtain the evaluation weight parameters corresponding to the target uncertainty value; Extract the target density ratio corresponding to the target training sample from the density ratio; and The evaluation weight parameter and the target density ratio are fused to obtain the evaluation weight of the target training sample.
11. The causal effect assessment method according to claim 9, wherein, The step of training the preset evaluation model based on the current pseudo-label and weighted sample data to obtain the evaluation model includes: The weighted sample data is input into the preset evaluation model to obtain the predicted causal effect value of the target training sample; Select the target pseudo-label corresponding to the target training sample from the current pseudo-labels, and determine the target loss information of the target training sample based on the predicted causal effect value and the target pseudo-label; and The preset evaluation model is converged based on the target loss information to obtain the evaluation model.
12. The causal effect assessment method according to claim 1, wherein, The acquisition of the training data includes: Obtain the source domain data corresponding to the preset intervention measures; Obtain candidate sample data corresponding to the target object, and select target domain data from the candidate sample data; and The source domain data and the target domain data are used as the training data.
13. The causal effect assessment method according to claim 12, wherein, The step of obtaining the source domain data corresponding to the preset intervention measures includes: Obtain a set of candidate objects, and select experimental objects and control objects from the set of candidate objects. The experimental objects include at least one candidate object to which the preset intervention measures are applied, and the control objects include at least one candidate object to which the preset intervention measures are not applied. Obtain the response data of the experimental subjects after the application of the preset intervention measures to obtain the experimental group sample data; Obtain the response data of the control subjects after the pre-defined intervention was not applied, to obtain the control group sample data; and The experimental group sample data and the control group sample data are used as the source domain data.
14. The causal effect assessment method according to claim 12, wherein, The step of obtaining the source domain data corresponding to the preset intervention measures includes: Acquire historical observation data, which includes historical data observed after applying the preset intervention to the object or without applying the preset intervention; The response data of the experimental subjects are extracted from the historical observation data to obtain the experimental group sample data. The experimental subjects include at least one subject to which the preset intervention measures are applied. Response data of control subjects are extracted from the historical observation data to obtain control group sample data, wherein the control subjects include at least one subject who did not receive the preset intervention; and The experimental group sample data and the control group sample data are used as the source domain data.
15. The causal effect assessment method according to claim 1, wherein, Determining the density ratio between the target domain data and the source domain data in the training data includes: Obtain the sampling probability of the training samples in the target domain data from the training data to obtain the target domain sampling probability; Obtain the sampling probability of the training sample in the source domain data to obtain the source domain sampling probability; and The density ratio is obtained by determining the ratio of the target domain sampling probability to the source domain sampling probability.
16. The causal effect assessment method according to claim 1, wherein, After outputting the target causal effect value, the method further includes: When the target causal effect value exceeds the preset causal effect threshold, the preset intervention measures are used to intervene in the target object.
17. A causal effect assessment system, comprising: At least one storage medium storing at least one instruction set for causal effect assessment; as well as At least one processor is communicatively connected to the at least one storage medium. When the causal effect assessment system is running, the at least one processor reads the at least one instruction set and executes the causal effect assessment method according to any one of claims 1-16 according to the instructions of the at least one instruction set.
Citation Information
Patent Citations
Machine learning model training method and device and computer readable storage medium
CN110852446A
Individual processing effect evaluation method based on variational generative adversarial network
CN114239744A