CausalPFN: Amortized Causal Effect Estimation via In-Context Learning

Vahid Balazadeh, Hamidreza Kamkari, Valentin Thomas, Benson Li, Junwei Ma +2 more
6/9/2025
cs.LGstat.ML

Official code: vdblm/CausalPFN (121 stars, Apache-2.0, last commit 2026-02-27). 1 more implementation below.

Abstract

Causal effect estimation from observational data is fundamental across various applications. However, selecting an appropriate estimator from dozens of specialized methods demands substantial manual effort and domain expertise. We present CausalPFN, a single transformer that amortizes this workflow: trained once on a large library of simulated data-generating processes that satisfy ignorability, it infers causal effects for new observational datasets out of the box. CausalPFN combines ideas from Bayesian causal inference with the large-scale training protocol of prior-fitted networks (PFNs), learning to map raw observations directly to causal effects without any task-specific adjustment. Our approach achieves superior average performance on heterogeneous and average treatment effect estimation benchmarks (IHDP, Lalonde, ACIC). Moreover, it shows competitive performance for real-world policy making on uplift modeling tasks. CausalPFN provides calibrated uncertainty estimates to support reliable decision-making based on Bayesian principles. This ready-to-use model requires no further training or tuning and takes a step toward automated causal inference (https://github.com/vdblm/CausalPFN/).

View on arXivView PDF

Code Implementations(2)

vdblm/CausalPFNOfficial100%
Apache-2.0

CausalPFN: Amortized Causal Effect Estimation via In-Context Learning

12114Python, Jupyter NotebookJun 9, 20257 months agoApache-2.0
causal-inferencecausalpfnfoundation-modelsmachine-learning
Apache-2.0

CausalPFN: Amortized Causal Effect Estimation via In-Context Learning

10Python, Jupyter NotebookNov 5, 202511 months agoApache-2.0

Similar Papers

Cite this paper

@article{balazadeh2025causalpfn,
  title  = {CausalPFN: Amortized Causal Effect Estimation via In-Context Learning},
  author = {Vahid Balazadeh and Hamidreza Kamkari and Valentin Thomas and Benson Li and Junwei Ma and Jesse C. Cresswell and Rahul G. Krishnan},
  year   = {2025},
  eprint = {2506.07918},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.07918v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.07918.svg)](https://codeofpaper.com/paper/2506.07918)

Discussion