FOUNDATIONAL IN-CONTEXT CAUSAL MODELS
A causal model is trained to generate causal outcome distributions based on a set of context data and a set of query instances. Causal training data is generated by selecting a subset of fields from an initial data table to form the features for the causal model and another subset as the outcomes for different treatments. Treatments are determined based on the selected covariates, enabling causal mechanisms to account for potential dependence of treatment selection on data features while ensuring independence of the outcomes. The causal model may then generate outcome distributions for queries with a given treatment as a histogram of conditional causal outcomes that is trained with a histogram training loss. By training the model with training data having a wide variety of causal mechanisms, the model can effectively determine causal outcomes based on the context for a particular domain without requiring extensive fine-tuning of the causal model.
This application claims the priority benefit of U.S. Provisional Application No. 63/811,023, filed May 23, 2025, the contents of which is hereby incorporated by reference in its entirety.
BACKGROUNDThis disclosure relates generally to causal modeling and more particularly to causal modeling and training of in-context causal models.
Causal models attempt to predict outcomes for particular treatments (e.g., causal effects subsequent from a particular intervention). These causal effects are notoriously difficult to successfully model and to distinguish causal outcomes from coincidental or co-occurring effects. Usually, modeling approaches are fine-tuned on extensive data for a specific domain, typically in conjunction with human expert design and “intuition” about causal mechanisms. In addition, training data for causal mechanisms is limited, often expensive to obtain, and without careful controls may improperly conflate correlative effects with causal effects. As such, there is a need for developing effective causal training data for a variety of causal relationships as well as effective model architectures and related training approaches to enable a causal model to be applied to many types of data without extensive fine-tuning or expert input.
SUMMARYThis disclosure provides causal models that learn to model a wide variety of different types of causal mechanisms using a context for a particular domain. For a particular domain, rather than fine-tuning the model, the causal model uses a context of examples (features, treatment, outcome) to implicitly determine the relevant causal mechanism for a queried domain without requiring any per-domain tuning. This enables effective training and application of causal mechanisms in new domains with relatively smaller data sets and without extensive training.
As existing causal data sets may only include certain types of causal relationships and are typically expensive to generate, causal data sets are generated from non-causal data in a way that obtains a large variety of causal relationships in the generated training causal data. To generate causal training data, a subset of fields for an initial data set (e.g., a non-causal data set) are selected as covariate features for the causal training data. The covariate features describe each respective data instance in the causal training data (e.g., as an input x) and may represent the features that, in inference, may be known about the data instance. To obtain a corresponding set of treatments, another set of fields is selected to form the outcomes associated with respective treatments, which may be perturbed to vary the original data values. Because real causal data can often only apply a single treatment to a data sample, a “selected treatment” is selected for each data instance based on the covariate features and may include a probabilistic assignment to the possible treatments (e.g., with sampling using a Bernoulli distribution based on the covariate features). For the set of treatments, another set of fields is selected to form the outcomes associated with respective treatments, which may be perturbed to vary the original data values, such that the original field values may represent the mean but may include measurement and other deviation/error in observed outcomes. By generating multiple training data sets in this way with different selected fields across multiple initial data sets, causal training data with multiple different causal mechanisms can be effectively generated.
To model causal effects with a plurality of causal mechanisms, a causal model receives a “context” for the domain including a set of data instances each having a set of covariate features, applied treatments, and associated outcomes. The causal model receives a set of queries and associated treatments for which to determine predicted outcomes. The causal model is a transformer-style model that applies attention across the context to evaluate the queries independently (without attention across the set of queries). Rather than generate a specific outcome, the causal model obtains outcome bins describing the likelihood that the mean outcome for the treatment of the query belongs to that outcome bin, enabling a distribution of conditional outcomes to be generated for the queries. During training, a histogram training loss may be applied with respect to a training outcome for the treatment associated with each query data instance. Using the training data with multiple causation mechanisms, the causal model learns different possible causation relationships and determines an outcome distribution dynamically for an arbitrary domain without fine tuning. That is, during inference, queries for a given domain, including designated treatments, may be evaluated in conjunction with a set of context instances for the domain to obtain a distribution of conditional outcomes for the respective treatments and without requiring fine-tuning on the domain.
more embodiments.
The figures depict various embodiments of the present invention for purposes of illustration only. One skilled in the art will readily recognize from the following discussion that alternative embodiments of the structures and methods illustrated herein may be employed without departing from the principles of the invention described herein.
DETAILED DESCRIPTION Architecture OverviewThe causal modeling system 100 includes various computing modules and data stores for training and applying the causal model 140. Particularly, the causal modeling system 100 may generate training data for the causal training data 150 used to train parameters of the causal model 140. A data generation module 130 may generate the training data based on one or more data generation mechanisms (DGMs), such that the causal training data 150 may include training data representing a wide variety of causal mechanisms that may be learned by the causal model 140. A model training module 120 may then use the causal training data 150 to train parameters of the causal model 140 using a model training module 120. Additional details of training data generation processes and training of the causal model 140 are discussed further below, particularly with respect to
The causal modeling system 100 may also include a causal inference module 110 that uses the (trained) causal model 140 with a set of inference domain data 160 for evaluating one or more query data instances. The causal inference module 110 may receive one or more query data instances in a particular domain for application to the causal model 140 and return the resulting outcome predictions (e.g., as a distribution) to the requesting system or another system for receiving outcome predictions. As discussed further below, the causal model 140 may use a set of domain data to characterize a particular domain for performing causal inference. Each domain defines a specific data set for a particular type of causal inference. For example, one domain may relate to prediction of all-cause mortality based on a certain set of patient characteristics and related treatments, and another domain may relate to prediction of cardiovascular disease (CVD) risk, which may have differing patient characteristics and related treatments.
During inference, the domain data may be obtained from the inference domain data 160 and used to form the context used for a set of queried data instances. In many instances, because the causal model 140 is effectively trained with a wide variety of causal mechanisms, causal inference with the causal model 140 may be performed using the context for a given domain as an input to the model without fine-tuning the causal model 140 with respect to that domain. As such, the causal inference module 110 in some instances may use the same trained causal model 140 for evaluating multiple different domains (e.g., different types of data with different expected causal mechanisms). After training, the causal model 140 may thus be a “foundational” model, such that it may be effectively applied to a variety of additional data sets (e.g., domains) and in many cases require no additional training or fine-tuning for particular inference domains, enabling the causal model 140 be broadly used as-is across many domains. When applying the causal model 140 to a particular domain, the context for that domain informs the application of the causal model 140 to that domain and enables the causal mechanism of that domain to be effectively determined and applied to the queried data.
Although the components of the causal modeling system 100 are shown in
As a causal data model, rather than describe individual data instances with a plurality of features, each data instance is described with a set of covariates and is assigned a treatment that was applied (or prospectively could be applied) to the data instance. For the domain data 230 forming a context for the causal model 200, the treatment for a particular data instance typically describes the treatment applied to the data instance while the treatment for a query data instance 220 indicates the treatment for which a prediction of the causal model 200 is to be determined.
More formally, the causal model 200 attempts to determine an outcome for a data instance described with a set of covariates with respect to a particular treatment. As discussed further below, rather than a single outcome, the causal model 200 generates a treatment outcome distribution 240 for each query data instance 220 that describes the distribution of outcomes for the data instance (as described by its covariates) when the particular associated treatment is applied to the query data instance 220. For example, for a domain relating to CVD risk, the covariates may describe various patient data, such as height, weight, age, blood pressure, laboratory tests, and so forth for a given patient. The treatment may be associated with particular types of treatment modalities that may be applied to the patient, such as a placebo, a medication, a surgical intervention, and so forth. The treatment outcome distribution 240 may provide a numerical evaluation of the outcome likelihoods of various values when the associated treatment is provided to that patient.
The domain data 230 may provide a context for evaluating the queried data instance 220. In the example relating to predicting CVD risk, the domain data 230 includes data instances associated with each of the potential treatments, shown in
Thus, the context may be formally described as a set of observations in the domain
in which each data instance n is described by a set of covariates xn, is associated with treatment tn, and resulting outcome yn (conditioned on treatment tn). Given the context in the domain Dobs, the causal model 200 thus aims to determine the treatment outcome distribution 240 as a conditional expected potential outcome (CEPO) described by a posterior predictive distribution (PPD) (together, a CEPO-PPD). Formally, the treatment outcome distribution 240 is thus the distribution qθ(⋅|x,t,Dobs) given causal model 200 parameters θ, query data instance covariates x, applied treatment t for the query data instance, and context Dobs. The treatment outcome distribution 240 may thus describe the distribution of the expected outcome for the query data instance 220. That is, the likelihood of a particular point (or outcome bin) on the outcome distribution describes the likelihood that the query data instance 220 has the associated outcome of that point (or outcome bin) as an expectation (e.g., as an average or mean).
As also further discussed below (e.g., with respect to
The causal model 200 may have various architectures in various embodiments. In one embodiment, the causal model 200 includes one or more attention mechanisms for attending to the context of the domain data 230. In some embodiments, the causal model 200 includes an attention mechanism across the domain data 230 (such that the attention is applied across the various data instances of the different treatments of the domain data) and does not apply attention across the query data instances 220. In this way, the causal model 200 may be configured to process a plurality of query data instances 220 without attention affecting the processing of each. In various embodiments, the causal model 200 is a transformer-style model including token embedding of data instance inputs. In one embodiment, the context is represented as a sequence of row tokens that each encodes the covariates, treatment, and outcome for the respective data instance. To apply the causal model to a set of query data instances, each query data instance may be embedded in a query token that represents the covariates and treatment of the respective query data instance. The context and query data instances may then be processed with attention, self-attention, and multi-layer perceptron (MLP) layers to process the context and query data instances with respective parameters for each layer. In some circumstances, the attention layers may include self-attention within a particular token (e.g., for a particular data instance) and may include attention across the plurality of context tokens. As one example, a projection layer may then be applied to obtain the output distribution for the queried data instances. The causal model 200 may also use asymmetric masking to apply attention to the context without applying attention to the queried data instances. Thus, the attention mechanism may attend to all context tokens, while the query data instance tokens attend only to the context, ensuring that the resulting outcome distributions (for each query data instance) are mutually independent while processing multiple data instances simultaneously.
The treatment outcome distribution 240 for a particular query data instance 220 may be provided to a requesting device (e.g., by the causal inference module 110) or may be used to perform additional evaluation of the query data instance 220. For example, a sample may be taken from the treatment outcome distribution 240 to determine a particular expected outcome for the query data instance 220 that describes the “expected” (e.g., as a mean) outcome for that query data sample. In some embodiments, the treatment outcome distribution 240 may be sampled from multiple times to determine a variance, deviation, or other statistical measure of the expected outcome for the query data instance 220. In some embodiments, the causal model 200 may include stochastic or other randomizing elements, such as different selections of data instances to form the set of domain data 230 or as components in layers of the causal model 200. In these instances, the causal model 200 itself may be executed additional times to obtain differing treatment outcome distributions 240 from which additional statistical measures may be evaluated.
In addition to the CEPO-PPD for one treatment, the treatment outcome distribution 240 may also be used to evaluate additional conditional treatment effects. For example, the same query data instance may be applied to the causal model with different treatments (e.g., T0 and T1) to determine the respective treatment outcome distributions 240 for each treatment. The treatment outcome distributions for the query data instance(s) 220 and the associated treatment outcome distributions 240 for different specified treatments (T0, T1) may then be used to evaluate the expected differences across treatments for a specific query data instance 220 or across query data instances 220, which for binary treatments may be defined as an average treatment effect (ATE) or conditional average treatment effect (CATE).
As such, the causal mechanisms modeled by the causal model 200 may differ from other model approaches in various ways. First, as also discussed below, the causal model 200 may learn a plurality of differing causal mechanisms 210A-C. Each causal mechanism 210A-C represent different ways in which the covariates and treatments may affect the outcome for a data instance. Different causal mechanisms may represent different relationships between varying different covariates and treatments, which may include different types of relationships (e.g., linear, quadratic, exponential, step-functions, etc.) along with different relationship strengths (e.g., high, low, or negligible treatment effects across different treatments), and different effects across different covariates.
In addition, the causal model relates to a causal context that differs from situations in which models receive a set of features for describing each data sample without a treatment; by including the treatment, the causal model learns to contextually capture the different causal interactions that may occur at different regions of the covariate space when associated with the specified treatment. As also discussed below, the treatments are also not obligated to be independent of the covariates, and in many practical cases there may be a correlation between different regions of the covariate space and the frequency that different treatments are present in the context, such that the treatment is not effectively “another feature” for describing each data instance, but describes the particular causal action that conditions the outcome distribution. By training the model on the variety of causal mechanisms and representing a current data set as a context for the particular domain, the causal model 200 may thus effectively determine a causal mechanism for the current domain as a “sample” using the trained parameters from the variety of causal mechanisms.
As such, for the causal model 200 to effectively evaluate causal effects for unseen domains (i.e., characterized only by the domain data 230 and without fine-tuning of the causal model 200), the causal model 200 must be effectively trained with data representing an effective variety of causal mechanisms 210A-C. While some training data sets may exist for natural data or be generated directly from designated causal mechanisms, these approaches may not be optimally effective for modeling the unknown variety of causal mechanisms that may exist in unknown domains. For natural data (e.g., training data from actual experiments having designated treatments), besides the relatively low volume of this data, the resulting data may often include errors and address limited types of data on which experiments were performed, with data quality depending on the various controls for such experiments. Meanwhile, synthetic data sets that may be generated from various causal mechanisms may be reliant on the appropriate selection of causal mechanisms 210. The particular causal mechanisms selected may be incomplete or incorrectly rely on “expected” causal mechanisms for subsequent domains, such that simulated data generated in this way may fail to account for the full scope of potential causal mechanisms that may be present in particular domains, preventing the causal model 200 from properly learning the missing causal mechanisms.
As such, in addition or as an alternative to causal training data obtained in these ways, the causal modeling system 100 (e.g., with data generation module 130) may generate causal training data that represents a wider variety of causal mechanisms to be learned by the causal model 200. This generated data may be obtained by modifying initial data tables to characterize the data with simulated causal mechanisms as discussed below.
To obtain a suitable causal training data table 360, the fields of the initial data table 300 are processed to simulate various types of covariates 330, an applied treatment 340, and potential treatment outcomes 350 for data instances 335 based on the initial data table 300. Initially, a subset of fields 310 in the initial data table 300 may be selected 320 as a set of covariates 330A-C. The number of fields selected may correspond to the number of covariates 330 used in the causal training data table 360 and/or the causal model to be trained with the causal training data table 360. In the example of
Because typical real-world data sets cannot effectively perform counterfactual experiments (e.g., only a single treatment may be applied to a specific patient), each data instance 335 may be assigned one treatment 340 for use in the causal training data. However, to effectively select consistent outcomes, each treatment (e.g., treatment 0 or treatment 1) may be associated with a set of outcomes 350 based on corresponding fields of the initial data table.
For each of the treatments, a field 310 is selected for generating the value of the outcomes 350 of the data instance indicating the outcome for the associated data instance if the corresponding treatment is applied. In the example of
The different outcomes 350A-B are associated with different treatments that may be assigned to the respective data instance, such that depending on the selected treatment, a respective outcome 350 is selected as the outcome value for the data instance. The selected values are emphasized in
The treatments 340 assigned to the data instances 335A-D may be determined in various ways. In one example, the treatments 340 for the data instances 335 are randomly generated. In many real-world data sets, however, the treatments for data instances may not be independent of the covariates 330; rather, the covariates 330 may have some effect on the selection of the corresponding treatment 340 in many data sets. To simulate this treatment selection in real data sets, the treatment for each data instance 335 may be determined based on the corresponding set of covariates 330. The generated treatments based on the covariates may be a probabilistic assignment of a treatment 340 for each data instance 335A-D based on the covariates, such that a probability distribution is generated with the covariates 330 and a treatment 340 is sampled from the probability distribution. For example, the covariates 330 may be used to generate a Bernoulli distribution (or another distribution having outcome values corresponding to the number of treatments 340) for each data instance 335, which may be sampled from to obtain corresponding treatments 340. In some embodiments, the probability distribution (e.g., a Bernoulli distribution) may be determined by applying a random function to the covariates and applying a Sigmoid function to map the covariates to the distribution from which a treatment is sampled. The selection of the treatment 340 in one embodiment may thus be described in one embodiment as a sampling from the Bernoulli distribution of a sigmoid of a random function ƒ applied to the covariates X: T~Bernoulli(sigmoid(ƒ(X))). In addition, by using a sampling from a distribution, while the covariates may affect the likely selected treatment 340, the likelihood of sampling each treatment remains positive (i.e., greater than zero), ensuring that different frequencies of treatments may be selected for different regions of the covariate space while preventing any particular treatments from be excluded in the resulting causal data table. As such, different causal training data tables 360 may have different frequencies of each treatment, which may also vary within regions of the covariate space.
Each of the data instances 335 may then be added to a causal training data table 360 using the respective covariates 330, treatment 340, and at least the respective outcome 350 corresponding to the selected treatment 340. In some embodiments, multiple outcomes 350 may be included in the causal training data table 360, such that the selected outcome 350 is determined at a future point. By generating causal training data tables 360 (e.g., a plurality of such causal training data tables 360) for training causal models in this way, with varying selections of covariates, outcomes, and from different initial data tables 300, the overall causal training data set may include causal training data tables 360 capturing a large variety of different causal relationships without requiring completely random selection of treatments and while keeping treatment selection independent of the outcomes 350. Accordingly, any “base table” that may include no causal relationships can be used to generate a variety of effective causal data tables for training a causal model. This approach thus “simulates” a collection of data instances from an underlying data generating process (DGP) and provides strong ignorability by design (e.g., treatment Tis determined solely from X and therefore conditionally independent from potential outcomes 350A-B). In addition, sampling from the distribution (e.g., with a sigmoid function), the treatment frequency satisfies positivity, ensuring the assigned treatments have positive likelihood of each treatment. Though shown here for binary treatments, this approach may similarly be applied to any additional number of discrete treatments.
Particularly, a subset of fields of the initial data table are selected 410 as covariates for the causal training data tables. Then, another subset of fields, exclusive to the subset selected as covariates, is selected 420 as treatment outcomes for respective treatments, such that each treatment may be associated with a selected field from the initial data table. In various embodiments, the selected output fields may also be perturbed 430, for example with zero-mean randomization. Next, a treatment assignment is generated 440 and may be based on sampling from a probability distribution based on the selected covariates as discussed above. Finally, the causal training data table is stored 450 with the selected covariates, treatment assignment, and treatment outcome. Additional causal training data may be generated by re-using the same initial data table and varying the selection 410 of the covariates and the selection 420 of the treatment outcomes. Similarly, the process may be repeated by selecting 400 additional initial data tables to generate a large number of causal training data tables. Each of these causal training data tables may thus represent a different data generating process that can be learned by a causal model, and provides significant variation from one another for the causal mechanisms represented in each. The causal training data tables generated this way, in addition to any further training data, may then be used to train 460 a causal model that learns parameters capturing the large number of data generating processes.
As discussed above, the causal model 520 in some embodiments generates the causal outcome distribution 550 by generating a plurality of output logits 530A-N that represent individual output ranges for the causal model 520. The output logits 530A-N may represent unnormalized values for each output range, such that the output logits 530A-N may be normalized to a total likelihood of 1 by applying a SoftMax layer across the output logits 530A-N to obtain output bins 540A-N that together represent the causal outcome distribution 550. To obtain individual outcome predictions, the causal outcome distribution 550 for a query data instance 515 may be sampled to obtain a conditional outcome expectation.
To train the causal data model 520, a causal training data table 500 is selected and a set of training data instances are selected to form a batch of context data instances 510 and query data instances 515. In situations where the total data instances in the causal training data table 500 is larger than the total input size for the causal model 520 (e.g., the context data instances 510 and query data instances 515), the selected data instances for the training batch may be selected in various ways. For example, in some cases, the total number of data instances available in a causal training data table 500 (e.g., for a particular domain or data-generating process) may exceed the input size of the causal model 520. In one example, the data instances for inclusion in a batch and/or assignment to context data instances 510 or query data instances 515 are randomly selected. In another example, one or more data instances are selected to seed the selection of additional data samples based on similarity of the data instances in the causal training data table 500, where similarity may be measured based on distance of the covariates. In additional embodiments, context data instances 510 may also be selected to have at least a minimum number of data instances associated with each treatment.
The context data instances 510 and query data instances 515 (i.e., the covariates and selected treatment) are provided as inputs to the causal model 520 for obtaining a causal outcome distribution 550 as discussed above. To evaluate the accuracy of the causal outcome distribution 550 and train the model parameters, a histogram training loss 590 is determined that represents the model error as a histogram relative to the causal outcome distribution 550. To generate the histogram training loss 590, a relevant training outcome 570 for the query data instances 515 given the selected treatment t is determined. In some instances, the causal training data table 500 may already include the outcome of the selected treatment. In other instances, the causal training data table 500 may store query training outcomes 560 indicating outcome values for multiple treatments, e.g., as discussed with respect to
In some embodiments, rather than directly using the training outcome 570, and training the causal model to exclusively learn the related output bin, the training outcome 570 is “spread” to additional output bins, enabling additional nearby output bins in the outcome distribution to receive non-zero encouragement. Because the different portions of the causal outcome distribution are obtained by different outputs and output logits 530, a loss that encourages only the output logit 530 associated with the training outcome 570 may unduly encourage the model to learn individual output bins. Because the outputs also represent different expected outcomes, locally distributing the training outcome 570 to additional output bins 540 can be done without affecting the mean expectation. In one embodiment, a Gaussian kernel 575 is applied (e.g., with a small variance) to the training outcome 570 to spread the training outcome value to a training distribution 580 that can be represented in a plurality of bins and compared with the causal outcome distribution 550.
In one embodiment, the Gaussian kernel is integrated over the bins to obtain Gaussian quantized probabilities
and used to minimize the Histogram Training Loss 590. In some embodiments, Histogram Training Loss is a Causal Data-Prior Loss, such as:
In which: θ are the model parameters,
-
- ψ~π is a data-generating process ψ selected from a plurality of data generating processes π learned by the model (i.e., a particular training data set);
- μt is the conditional treatment outcome for treatment t; and
- Dobs are the data instances representing the DGP ψ in an input context.
By minimizing the causal data-prior loss, the model qθ learns to map the observational data to the corresponding predictive distribution directly. For each training batch, a DGP is sampled (i.e., a causal training data table is selected or generated) to obtain a DGP ψi~π represented with an observational data set Dobs and a query data instance and provide both the observational data and query to the model. The model outputs a CEPO-PPD as the causal outcome distribution 550, and the model parameters θ are updated to increase the probability assigned to the true CEPO value and distribution through the Gaussian kernel 575. Through stochastic gradient descent, the updated parameters minimizes the data-prior loss and implicitly learns to perform posterior-predictive inference, without ever explicitly computing the posterior.
In one embodiment, the Histogram Training Loss 590 is defined as
This loss is an approximate form of causal data-prior loss, which matches in the limit σ→0 and L→∞. As such, the expected value of the treatment outcome
In some embodiments, a temperature parameter may also be applied to the output logits 530 before applying the SoftMax function to obtain the output bins 540A-N. In some embodiments, the temperature parameters may be calibrated to set to calibrate the likelihood that the causal outcome distribution 550 includes the training outcome 570 for a query. While normally this may be performed with direct CATE calibration, in this instance, the CATE is never observed directly at test-time. Instead, the model training module may calibrate the temperature parameters with a regression calibration for observational data: an observed triple (t, x, y) for the context data instance is covered by the predicted credible interval when y lies inside the model's predicted interval for the CEPO-PPD (i.e., in the causal outcome distribution 550). The temperature parameter may be tuned e.g., based on coverage metrics and using any suitable tuning approach, such as a grid search.
By applying this training approach with varying causal training data tables 500 that represent many different DGPs, the causal model 520 learns to effectively generate a causal outcome distribution 550 for new domains (and can do so without fine-tuning the model on the domain) by using the context data instances 510 to effectively estimate the underlying DGP of the particular input domain and thus perform effectively as a foundational model for many different domains of causal analysis.
Particular data instances are selected 610 to form the context and queries for the causal model to be inputs to the model as shown in
The model parameters are applied 620 to the context and queries (i.e., each query data instance) to determine the causal outcome distribution for each query conditioned on the associated treatments. Then, the training outcome associated with the query data is determined 630 and used to determine 640 a training distribution for the query data, for example by applying a Gaussian kernel as discussed above. The training distribution is evaluated with the causal outcome distribution to determine 650 a histogram training loss based on the difference between the training distribution (from the labeled outcome) and the causal outcome distribution (determined by the current model parameters). Finally, the parameters of the causal model parameters are trained 660 based on the histogram training loss with a suitable model update process, such as gradient descent. By applying multiple rounds of this training process with batches of using a plurality of different causal training data, the causal model learns to represent a plurality of different data generating processes and can obtain causal treatment effect predictions effectively for new domains based on a context for that domain without requiring fine-tuning.
The foregoing description of the embodiments of the invention has been presented for the purpose of illustration; it is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Persons skilled in the relevant art can appreciate that many modifications and variations are possible in light of the above disclosure.
Some portions of this description describe the embodiments of the invention in terms of algorithms and symbolic representations of operations on information. These algorithmic descriptions and representations are commonly used by those skilled in the data processing arts to convey the substance of their work effectively to others skilled in the art. These operations, while described functionally, computationally, or logically, are understood to be implemented by computer programs or equivalent electrical circuits, microcode, or the like. Furthermore, it has also proven convenient at times, to refer to these arrangements of operations as modules, without loss of generality. The described operations and their associated modules may be embodied in software, firmware, hardware, or any combinations thereof.
Any of the steps, operations, or processes described herein may be performed or implemented with one or more hardware or software modules, alone or in combination with other devices. In one embodiment, a software module is implemented with a computer program product comprising a computer-readable medium containing computer program code, which can be executed by a computer processor for performing any or all of the steps, operations, or processes described.
Embodiments of the invention may also relate to an apparatus for performing the operations herein. This apparatus may be specially constructed for the required purposes, and/or it may comprise a general-purpose computing device selectively activated or reconfigured by a computer program stored in the computer. Such a computer program may be stored in a non-transitory, tangible computer readable storage medium, or any type of media suitable for storing electronic instructions, which may be coupled to a computer system bus. Furthermore, any computing systems referred to in the specification may include a single processor or may be architectures employing multiple processor designs for increased computing capability.
Embodiments of the invention may also relate to a product that is produced by a computing process described herein. Such a product may comprise information resulting from a computing process, where the information is stored on a non-transitory, tangible computer readable storage medium and may include any embodiment of a computer program product or other data combination described herein.
Finally, the language used in the specification has been principally selected for readability and instructional purposes, and it may not have been selected to delineate or circumscribe the inventive subject matter. It is therefore intended that the scope of the invention be limited not by this detailed description, but rather by any claims that issue on an application based hereon. Accordingly, the disclosure of the embodiments of the invention is intended to be illustrative, but not limiting, of the scope of the invention, which is set forth in the following claims.
Claims
1. A system for generating causal training data for a causal model, comprising:
- a processor that executes instructions; and
- a non-transitory computer-readable medium having instructions executable by the processor for: generating a causal training data table including a plurality of covariates, a selected treatment from a plurality of treatments, and a treatment outcome by: selecting a first subset of fields from an initial data table having a plurality of data instances as the plurality of covariates; selecting a second subset of fields from the initial data table as associated with the plurality of treatments; determining a selected treatment for each data instance; and determining the treatment outcome for each data instance based on the field in the second subset that is associated with the selected treatment; generating one or more additional causal training data tables having different covariates from different subsets of fields from the initial data table; and training a causal model based on the causal training data table and the one or more additional causal training data tables.
2. The system of claim 1, wherein the selected treatment for each data instance is based on the first subset of fields for the data instance.
3. The system of claim 2, wherein selecting the treatment comprises sampling from a probability distribution based on the first subset of fields.
4. The system of claim 3, wherein the probability distribution is a Bernoulli distribution.
5. The system of claim 3, wherein the probability distribution is based on a Sigmoid function applied to the first subset of fields.
6. The system of claim 1, wherein the first subset of fields is randomly selected from the initial data table.
7. The system of claim 1, wherein determining the treatment outcome includes randomly perturbing the field in the second subset that is associated with the selected treatment.
8. The system of claim 7, wherein the random perturbation has a zero mean.
9. The system of claim 1, wherein the causal model is trained with a context and query selected from the causal training data table.
10. A method for generating causal training data for a causal model, comprising:
- generating a causal training data table including a plurality of covariates, a selected treatment from a plurality of treatments, and a treatment outcome by: selecting a first subset of fields from an initial data table having a plurality of data instances as the plurality of covariates; selecting a second subset of fields from the initial data table as associated with the plurality of treatments; determining a selected treatment for each data instance; and determining the treatment outcome for each data instance based on the field in the second subset that is associated with the selected treatment;
- generating one or more additional causal training data tables having different covariates from different subsets of fields from the initial data table; and
- training a causal model based on the causal training data table and the one or more additional causal training data tables.
11. The method of claim 10, wherein the selected treatment for each data instance is based on the first subset of fields for the data instance.
12. The method of claim 11, wherein selecting the treatment comprises sampling from a probability distribution based on the first subset of fields.
13. The method of claim 12, wherein the probability distribution is a Bernoulli distribution.
14. The method of claim 12, wherein the probability distribution is based on a Sigmoid function applied to the first subset of fields.
15. The method of claim 10, wherein the first subset of fields is randomly selected from the initial data table.
16. The method of claim 10, wherein the method for determining the treatment outcome includes randomly perturbing the field in the second subset that is associated with the selected treatment.
17. The method of claim 16, wherein the random perturbation has a zero mean.
18. The method of claim 10, wherein the causal model is trained with a context and query selected from the causal training data table.
19. A non-transitory computer-readable medium for generating causal training data for a causal model, the non-transitory computer-readable medium comprising instructions executable by a processor for:
- generating a causal training data table including a plurality of covariates, a selected treatment from a plurality of treatments, and a treatment outcome by: selecting a first subset of fields from an initial data table having a plurality of data instances as the plurality of covariates; selecting a second subset of fields from the initial data table as associated with the plurality of treatments; determining a selected treatment for each data instance; and determining the treatment outcome for each data instance based on the field in the second subset that is associated with the selected treatment;
- generating one or more additional causal training data tables having different covariates from different subsets of fields from the initial data table; and
- training a causal model based on the causal training data table and the one or more additional causal training data tables.
20. The non-transitory computer-readable medium of claim 19, wherein the causal model is trained with a context and query selected from the causal training data table.
Type: Application
Filed: Mar 3, 2026
Publication Date: Nov 26, 2026
Inventors: Hamidreza Kamkari (TORONTO), Valentin Patrick Marie Thomas (TORONTO), Junwei Ma (TORONTO), Jesse Cole Cresswell (TORONTO)
Application Number: 19/555,674