How Well Do Prior-Data Fitted Networks Amortize Bayesian Inference?
Organizations: LMU Munich and Munich Center for Machine Learning
Abstract
Prior-data fitted networks (PFNs) are trained to approximate the Bayesian posterior predictive distribution (PPD) of a synthetic prior, yet results about the approximation quality are surprisingly thin. Taking an empirical risk minimization perspective, we decompose the deployment error of PFNs into prior, context, and amortization error, and measure the latter against a reference PPD under a realistic prior. Results show that PFNs generally recover the targeted PPD very well. Nevertheless, we find that parts of the residual amortization error persist, especially in rare settings under the prior pretraining distribution, even when scaling the model size, which manifests in disagreement between independently pretrained PFNs and leaves uncertainty about the predictor at inference time. As a remedy, we study multiple types of Bayesian model averages and find that these can consistently reduce this uncertainty and improve predictions up to full-size TabICLv2 models.
Figures & tables
| context size 1000 | context size 10000 | |||||||
|---|---|---|---|---|---|---|---|---|
| Model | DE | IVON | IVON | SG-MCMC | DE | IVON | IVON | SG-MCMC |
| tiny | ||||||||
| small | ||||||||
| medium | ||||||||
| large | ||||||||
Appendix figures & tables23 assets
Supplementary material from the paper’s appendix.
Appendix
| tiny | small | medium | large | |
|---|---|---|---|---|
| Maximum epochs | 30 | 40 | 55 | 70 |
| Maximum steps | 18,000 | 24,000 | 33,000 | 42,000 |
| Peak learning rate, nanoTabPFN | – | – | ||
| Peak learning rate, TabICLv2 | ||||
| Ensemble members | 8 | 8 | 8 | 4 |
| adaSGHMC | pSMILE | |
| Step size | ||
| Warm-up steps | 500 | 250 |
| Sampling steps | 2500 / 3000 / 2500 / 3500 | 1250 / 1500 / 1250 / 1750 |
| Thinning | every of the sampling steps (10 samples per chain) | |
| Gradient evaluations per chain | 3000 / 3500 / 3000 / 4000 | |
| Chains | 8 / 8 / 8 / 4 | |
| tiny | small | medium | large | |
| Effective sample size | ||||
| Learning rate | 1.0 | 1.0 | 0.3 | 0.3 |
| Training steps | 300,000 | 200,000 | 200,000 | 200,000 |
| 0.9 | ||||
| 0.99999 | ||||
| Weight decay | ||||
| tiny | small | medium | large | full | |
| NanoTabPFN | |||||
| Parameters (rounded) | 1M | 2M | 4M | – | – |
| Transformer layers | 4 | 4 | 5 | – | – |
| Embedding dimension | 128 | 192 | 256 | – | – |
| Attention heads | 4 | 6 | 8 | – | – |
| MLP hidden dimension | 256 | 384 | 512 | – | – |
| synthetic | TabArena, context 1000 | TabArena, context 10000 | ||||
|---|---|---|---|---|---|---|
| Model | ||||||
| tiny (1.5M) | 16.1 | 9.4 | ||||
| small (2M) | 15.5 | 9.2 | ||||
| medium (7.5M) | – | – | ||||
| large (9M) | 13.6 | 8.2 | ||||
| Model | Accuracy | ROC AUC | LPPD | |
|---|---|---|---|---|
| tiny | 0 | 0.8073 | 0.8737 | |
| 1 | 0.8035 - | 0.8714 - | ||
| 8 | 0.8068 | 0.8738 | ||
| 16 | 0.8063 | 0.8742 | ||
| 32 | 0.8077 | 0.8752 | ||
| 64 | 0.8072 | 0.8749 |
| context size 1000 | context size 10000 | |||
|---|---|---|---|---|
| Model | adaSGHMC | pSMILE | adaSGHMC | pSMILE |
| tiny | (11/30) | (26/30) | (11/30) | (26/30) |
| small | (4/30) | (22/30) | (5/30) | (25/30) |
| medium | – | (12/30) | – | (13/30) |
| large | (18/30) | (26/30) | (9/30) | (26/30) |
| steps | wall-clock (h) | ||||
|---|---|---|---|---|---|
| Stage (max. rows) | official | ours | steps/h | official | ours |
| 1 (1024) | |||||
| 2 (10,240) | |||||
| 3 (60,000) | |||||
| Total, one model | |||||
| GPU hours, one model | |||||
| Classification (170 datasets) | ||||
|---|---|---|---|---|
| Stage | LPPD | Brier | ROC AUC | |
| 1 | average member | |||
| best member | ||||
| deep ensemble | ||||
| 2 | average member | |||
| best member | ||||
| 1024 | 1024–10240 | 10240 | |
|---|---|---|---|
| Classification | |||
| Stage 1 | |||
| Stage 2 | |||
| Stage 3 | |||
| Regression | |||
| Stage 1 |
| TabArena, within prior support | BeyondArena OOD | |
| Datasets | 30 | 38 |
| Split | iid | 20 iid, 7 temporal, 11 grouped |
| Features, median (range) | 20 (4–94) | 152 (3–22,215) |
| Training rows, median (range) | 3,637 (499–47,679) | 30,625 (114–1,000,350) |
| Classes, max | 5 | 20 |
| Beyond prior support | 0 | 33 (23 100 features, 17 48,000 rows, 3 10 classes) |
| Dataset | Features | Train rows | Classes |
|---|---|---|---|
| Amazon_employee_access | 9 | 21,846 | 2 |
| anneal | 38 | 599 | 5 |
| bank-marketing | 13 | 30,141 | 2 |
| Bank_Customer_Churn | 10 | 6,667 | 2 |
| blood-transfusion-service-center | 4 | 499 | 2 |
| churn | 19 | 3,333 | 2 |
| Dataset | Split | Feat. | Train rows | Cls | Outside the prior |
|---|---|---|---|---|---|
| amex_non_iid_1m | grouped | 190 | 1,000,350 | 2 | shift, 100 feat., 48k rows |
| asp_potassco_classification | grouped | 137 | 808 | 11 | shift, 100 feat., 10 cls |
| cardiotocography | grouped | 23 | 1,417 | 3 | shift |
| covertype | grouped | 14 | 341,750 | 3 | shift, 48k rows |
| dementia_prediction | grouped | 9 | 247 | 3 | shift |
| mice_protein_trisomy_discriminant | grouped | 77 | 720 | 8 | shift |