Skip to content

Add TabpfnEstimator#1392

Open
jchung02 wants to merge 1 commit intopy-why:mainfrom
KU-LIM-Lab:add-tabpfn-estimator
Open

Add TabpfnEstimator#1392
jchung02 wants to merge 1 commit intopy-why:mainfrom
KU-LIM-Lab:add-tabpfn-estimator

Conversation

@jchung02
Copy link

This PR adds TabpfnEstimator, bringing TabPFN (Prior-Data Fitted Networks) into DoWhy's estimator suite as an outcome model for backdoor adjustment.

TabPFN is a tabular foundation model pre-trained on synthetic data — it requires no hyperparameter tuning and works out of the box, making it a practical option for small-to-medium tabular datasets (≤10,000 samples, ≤500 features).

Key Features

  • Automatic model type detection: selects TabPFNClassifier or TabPFNRegressor based on outcome dtype and cardinality
  • Single-GPU and multi-GPU inference support; multi-GPU mode distributes n_estimators across devices.
  • Bootstrap-based confidence interval and significance testing
  • Informative warnings for TabPFN pretraining limit violations (sample size, feature count, class count)

Added Files

  • dowhy/causal_estimators/tabpfn_estimator.py
  • tests/causal_estimators/test_tabpfn_estimator.py
  • docs/source/example_notebooks/dowhy_tabpfn_estimator.ipynb

Modified Files

  • docs/source/example_notebooks/dowhy_estimation_methods.ipynb
    — Added Method 9: TabPFN Estimator section

Dependencies

TabpfnEstimator requires additional packages not included in DoWhy's default dependencies:

pip install tabpfn torch

Installation instructions and authentication guidance for TabPFN v2.5+ are included in the source file and example notebooks.

References

  1. Hollmann, N., Müller, S., Eggensperger, K., and Hutter, F.
    TabPFN: A Prior-Data Fitted Network for Tabular Data.
    ICLR (2023). https://arxiv.org/abs/2207.01848
  2. Hollmann, N., Müller, S., Purucker, L., Krishnakumar, A., Körner, M.,
    Hoo, R., Schirrmeister, R. T., and Hutter, F.
    Accurate predictions on small data with a tabular foundation model.
    Nature (2025). https://doi.org/10.1038/s41586-024-08328-6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant