
Getting Started
Install theunsupervised extension:
TabPFNUnsupervisedModel with a TabPFN classifier and regressor model to generate new data:
How it Works
The data generation process leverages the same probabilistic modeling used in TabPFN’s unsupervised mode:- Each feature is modeled conditionally on the others.
- The chain rule of probability is used to estimate the full joint distribution.
- New samples are drawn using the learned conditional dependencies, controlled by a temperature parameter (
temp) that influences variability and diversity.
Causally-Informed Generation with a DAG
By default, each feature is conditioned on all other features. If you have prior knowledge about the causal structure of your data, you can pass a Directed Acyclic Graph (DAG) togenerate_synthetic_data via the dag parameter. This restricts each feature’s conditioning set to its declared parents, so generated samples respect your domain knowledge about feature dependencies.
The dag is a dict[int, list[int]] mapping each feature index to the list of its parent feature indices. Features are generated in topological order (parents before children). Features with no declared parents are generated marginally first. Partial DAGs are supported — features not present as keys fall back to the default all-features conditioning.
The DAG must be acyclic. A
ValueError is raised if a cycle is detected, with the cycle path included in the error message. Features listed with an empty parent list ([]) are generated first using only marginal information.Use Cases
Synthetic data generation can be applied across a range of research and engineering tasks:- Data augmentation - expand limited datasets for training or validation.
- Privacy-preserving analytics - create realistic datasets without exposing sensitive information.
- Counterfactual generation - synthesize data under interventions by modifying the DAG.
Google Colab Example
Check out our Google Colab for a demo.