Foundation Models for Causal Inference via Prior-Data Fitted Networks

Yuchen Ma, Dennis Frauen, Emil Javurek, Stefan Feuerriegel
6/12/2025
cs.LG

No official code found. Best implementation: yccm/CausalFM (51 stars, Apache-2.0, last commit 2026-02-08).

Abstract

Prior-data fitted networks (PFNs) have recently been proposed as a promising way to train tabular foundation models. PFNs are transformers that are pre-trained on synthetic data generated from a prespecified prior distribution and that enable Bayesian inference through in-context learning. In this paper, we introduce CausalFM, a comprehensive framework for training PFN-based foundation models in various causal inference settings. First, we formalize the construction of Bayesian priors for causal inference based on structural causal models (SCMs) in a principled way and derive necessary criteria for the validity of such priors. Building on this, we propose a novel family of prior distributions using causality-inspired Bayesian neural networks that enable CausalFM to perform Bayesian causal inference in various settings, including for back-door, front-door, and instrumental variable adjustment. Finally, we instantiate CausalFM and explicitly train models to perform in-context learning in these settings. We show that CausalFM achieves competitive in-context learning performance even when compared to baselines that are specifically trained for the task at hand. In sum, our framework can be used as a general recipe to train foundation models for various causal inference settings. In contrast to the current state-of-the-art in causal inference, CausalFM offers a novel paradigm with the potential to fundamentally change how practitioners perform causal inference in medicine, economics, and other disciplines.

View on arXivView PDF

Code Implementations(1)

yccm/CausalFMCommunity60%
Apache-2.0

PyTorch Implementation on Paper [ICLR2026]: Foundation Models for Causal Inference via Prior-Data Fitted Networks

511Python, Jupyter NotebookJun 12, 20258 months agoApache-2.0

Similar Papers

Cite this paper

@article{ma2025foundation,
  title  = {Foundation Models for Causal Inference via Prior-Data Fitted Networks},
  author = {Yuchen Ma and Dennis Frauen and Emil Javurek and Stefan Feuerriegel},
  year   = {2025},
  eprint = {2506.10914},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.10914v2}
}

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.10914.svg)](https://codeofpaper.com/paper/2506.10914)

Discussion