TL;DR
TabPFN is a tabular foundation model pre-trained purely on synthetic data to predict labels, but does it actually understand the underlying causal data-generating process? By attaching a lightweight cross-attention decoder with learnable "causal tokens" to frozen TabPFNv2 representations, the authors demonstrate that TabPFN implicitly encodes causal graphs. This adapter framework outperforms traditional causal discovery baselines, with causal information peaking in the model's middle layers.
What Problem Does This Paper Address?
Inferring causal directed acyclic graphs (DAGs) from observational and interventional data—known as causal discovery—is crucial across the sciences. However, classical methods (constraint-based, score-based) depend on rigid assumptions (e.g., linear relationships, specific noise distributions) and scale poorly as the number of features increases.
While recent deep learning models amortize causal discovery by training transformers from scratch on synthetic structural causal models (SCMs), this paper asks a different question: Do existing tabular foundation models (TFMs) like TabPFN already encode causal structures? Because TabPFN is pre-trained on synthetic SCM data to perform standard classification and regression, it might inadvertently build internal representations of the causal mechanisms generating the data.
Methods
To extract causal information without modifying TabPFN’s pre-trained weights, the authors propose an adapter-based framework:
- Frozen TabPFN Backbone: Cell values and an interventional indicator (distinguishing observational from intervened samples) are mapped into cell embeddings ($d = 192$) and passed through the first $L = 4$ layers of TabPFNv2's dual-attention encoder.
- Universal Causal Tokens & Decoder: They introduce $t = 30$ learnable universal causal tokens ($Q_0 \in \mathbb{R}^{t \times f \times d}$). A learnable dual-attention decoder cross-attends from these causal tokens (queries) to the frozen data tokens from TabPFN (keys/values).
- Graph Prediction Head: The decoder outputs are reduced along the token dimension into $k = 4$ summary tokens using summary statistics (
max,min,mean,std), concatenated into per-feature vectors, and linearly projected into parent ($V_i$) and child ($U_i$) representations. The inner product between parent and child embeddings followed by a sigmoid gives the edge probability $A_{ij}$. - Loss Function: The model is trained end-to-end (3.6M learnable parameters) using weighted binary cross-entropy on graph edges, combined with an augmented Lagrangian acyclicity constraint using power iteration to bound the adjacency matrix's spectral radius.
Input Data (with Interventions)
│
▼
[Frozen TabPFNv2 Encoder (Layers 1-4)] ──► Data Tokens (Keys/Values)
│
[Learnable Causal Tokens (Queries)] ─────► [Dual-Attention Decoder]
│
[Aggregation (k=4)]
│
[Parent/Child Projections]
│
▼
Predicted Adjacency Matrix
Datasets
The authors train and evaluate on synthetic datasets generated via structural causal models under causal sufficiency:
- Graph Topologies: Five graph types are used to guarantee structural diversity: Erdős–Rényi, Scale-Free (in- and out-degree variants), Watts–Strogatz small-world, Stochastic Block Models (SBM), and Geometric Random Graphs (GRG).
- Mechanisms & Noise: Functional mechanisms are sampled as either linear functions or Random Fourier Features (RFF). Noise is additive, drawn from Gaussian, Laplace, or Cauchy distributions.
- Interventions: Single-variable interventions targeting 50% of the available nodes.
- Training & Test Sets: Trained on batches of datasets with variable counts $f \in [4, 20]$ (consisting of 100/200 observational and interventional samples). Evaluated on 500 synthetic datasets across feature sizes of 5, 7, 10, 15, and 20 (each with 300 observational and 300 interventional samples), benchmarking against AVICI (a model trained specifically for causal discovery) and statistical baselines (GIES, IGSP, DCDI).
Key Insights and Ideas
- Causal Signal Concentrates in the Middle Layers: Probing layer-by-layer revealed that causal discovery performance peaks when tapping TabPFN at layers 4–6. Earlier layers preserve low-level cell features, while later layers specialize toward the downstream classification task, shedding task-agnostic causal structure.
- Pre-training is Crucial: Probing ablations showed that replacing TabPFN's weights with random initialization, using raw pre-encoder embeddings, or fine-tuning weights to degrade classification performance ("Worse Weights") significantly drops causal discovery accuracy. Good predictive representations directly correlate with causal graph quality.
- Network Density Matters: While TabPFN performs competitively on sparse graphs or graphs with clear hub nodes (Scale-Free, Geometric Random Graphs), its edge accuracy declines on dense graphs with distributed edges (Erdős–Rényi, SBM). This aligns with TabPFN's predictive objective, which optimizes information flow toward a single target rather than full feature-to-feature interactions.
Key Results
- Competitive with Dedicated Models: On ROC AUC, the TabPFN adapter achieves performance close to AVICI across all feature dimensions (maintaining stable ROC AUC scores between ~0.8 and ~1.0).
- Outperforms Statistical Baselines: Consistently outperforms traditional baselines (GIES, IGSP, and DCDI) on both ROC AUC and Average Precision (AP).
- Scaling Drop in Precision: On Average Precision (AP), performance drops as the number of variables increases to 15 and 20 (e.g., dropping toward ~0.6–0.7 AP), driven by high false-positive rates on dense graphs.
Limitations and Future Work
- Synthetic Evaluation Only: The study evaluates exclusively on synthetic SCM data where ground-truth DAGs are accessible under causal sufficiency; real-world tabular benchmarks remain untested.
- Dense Graph Scaling: TabPFN struggles to maintain high precision when graph density and feature counts grow, as it was primarily pre-trained to model feature-to-target dependencies rather than full graph topologies.
- Future Directions: Adapting tabular foundation models to extract directional causal information opens paths toward fine-tuning foundation models explicitly with causal objectives and deploying them as explainability engines for real-world tabular data.
Summary updated