Skip to main content

Estimating treatment effects

In many domains, we are interested in predicting outcomes given different actions, often called treatments, in order to decide which one to apply. The difference between the outcome with a treatment and without one is the causal effect. In a randomized controlled trial (RCT), chance decides who gets the treatment (T=1) and who does not (T=0). The two groups then differ only by chance and by the treatment. Let XX denote unit features, and Y(1)Y(1) and Y(0)Y(0) the outcome with and without treatment. We observe only one of them per unit (the “fundamental problem of causal inference”).
  • The average treatment effect (ATE) is τ≔E[Y(1)−Y(0)]\tau\coloneqq\mathbb{E}[Y(1)-Y(0)].
  • The conditional average treatment effect (CATE) is τ(x)≔E[Y(1)−Y(0)∣X=x]\tau(x)\coloneqq\mathbb{E}[Y(1)-Y(0)|X=x].
We give an example of how TabPFN can be used to estimate the CATE within standard “Plugin-estimators” for causal inference. Such estimators build treatment effect estimates out of predictions. This allows leveraging TabPFN’s predictive power for causal inference.

Loading RCT data and estimating the ATE

We use data from the LaLonde experiment, a National Supported Work RCT that offered job training to 185 candidates, with 260 control candidates (Dehejia–Wahba 1999). The outcome is earnings in USD at follow-up. In an RCT, the difference in mean outcomes already estimates the ATE, without a model, so we can compute it as a first benchmark.
We find a large positive and significant average treatment effect: candidates with job training earn more on average. This will serve as a sanity check for our more detailed effect estimates using TabPFN.

CATE estimation using TabPFN

We fit one TabPFNRegressor for the treatment group, and one for the control group, and take their difference. The combined estimator is a T-learner: one model learns earnings with training, the other earnings without. t_learner returns the two fitted models, and the difference of their predictions is the predicted treatment effect for each observation.
Earnings are exactly zero for 35% of the control group and 24% of the treated group, hence we use presets="zero_inflated", which requires tabpfn 10.2.0 or later.
As a sanity check for our CATE estimator, we average the predicted effects to obtain an ATE for the plug-in estimator, and compare it to the difference in means between treatment and control group calculated above.
We find that the plug-in ATE is close to the USD 1,794 found above, and well inside the confidence interval of the difference in means. With the sanity check completed, we move on to inspecting how treatment effects differ for different features.

Comparing outcome distributions for different landmarks

To see how the effect differs between observations, compare the predicted earnings distributions with and without training for two observations: (i) no high-school degree and earnings of USD 1,000 in 1975, and (ii) with a degree and USD 5,000 earnings in 1975. TabPFN’s ability to predict a distribution over outcomes allows us to contrast the distributions (here in the form of quantiles) for the two TabPFN predictors fitted as part of the T-learner.
Predicted 1978 earnings with and without training for two landmark men. The predicted effect is USD 834 for the man without a degree and USD 2,052 for the man with a degree. Training raises the predicted mean earnings by USD 834 for the man without a degree, and by USD 2,052 for the man with a degree. It also lowers the predicted chance of earning nothing in 1978, from 37% to 31% and from 35% to 21%. Only 4 men in the control group have a degree and earned between USD 3,000 and 7,000 in 1975, so the second landmark rests on little data.

Summary

By fitting precise models for outcomes under treatment and control, TabPFN enables accurate treatment effect estimation as a function of the features. In addition, TabPFN’s predictive distributions provide detailed insights into the properties of treatment effects. In combination, this allows developing policies on who to treat, and understanding what outcomes are likely following a treatment.

Regression

Point predictions and guidance on other regression outputs.

Classification

Binary and multi-class classification guide.

Data Generation

Generate synthetic data that respects a causal DAG.

TabPFN-4 changelog

Release notes and upgrade guidance for TabPFN-4.