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 denote unit features, and and 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 .
- The conditional average treatment effect (CATE) is .
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.CATE estimation using TabPFN
We fit oneTabPFNRegressor 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.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.Code for the landmarks
Code for the landmarks
Code for the plot
Code for the plot

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.