Loading…
Loading…
A from-scratch reimplementation of the TabPFN v2 classifier (Hollmann et al., Accurate predictions on small data with a tabular foundation model, Nature 637, 2025). The model and inference follow the paper's Methods, and the training data come from the open TabICL prior. Code: Aiden-Jeon/minipfn (model src/minipfn/models/cell_transformer.py, training settings src/minipfn/recipes/tabpfn_v2.py).
This is not the official TabPFN v2 checkpoint, and it uses no official code or weights. For the official models see PriorLabs/TabPFN.
one_hot="all", the default), as long as the table stays within 160 columns. Softmax temperature is 0.9.Figures and numbers on this card come from the weights in this repo (sha256:8642571d2504, the first 12 hex digits of the SHA-256 of model.safetensors). It was trained in 100k-step chunks, each resuming the previous one. Train CE is the mean over 1,000 steps; every step samples new prior tables. Val CE is computed on 64 fixed prior tables every 5,000 steps. Final val CE is 0.740.
The benchmark is the paper's 29 AMLB classification datasets. Each score is the mean ROC AUC over the 10 OpenML folds. Paper values come from Supplementary Table 1 (TabPFN v2, default settings). All figures use the default inference settings (one_hot="all"). The last column keeps categorical columns as ordinal codes (one_hot="off"); only the 9 datasets with categorical columns differ.
| Checkpoint | Mean ROC AUC | With one_hot="off" |
|---|---|---|
| 100k steps | 0.9175 | 0.9169 |
| 200k steps | 0.9225 | 0.9222 |
| 300k steps | 0.9208 | 0.9203 |
| 400k steps | 0.9197 | 0.9196 |
| 500k steps (this model) | 0.9238 | 0.9235 |
| Paper | 0.9323 |
Most of the gap comes from a few datasets:
| Dataset | Gap |
|---|---|
| philippine (5,832 rows × 308 features) | −0.105 |
| GesturePhaseSegmentationProcessed | −0.047 |
| wine-quality-white | −0.025 |
Without philippine, GesturePhaseSegmentationProcessed, wine-quality-white, kc1 and first-order-theorem-proving, the mean gap is −0.002.
uv pip install "minipfn @ git+https://github.com/Aiden-Jeon/minipfn"
from minipfn import TabPFNv2Classifier
# downloads aiden-jeon/minipfn-tabpfn-v2-classifier
# x_train can be a pandas DataFrame with categorical columns
clf = TabPFNv2Classifier().fit(x_train, y_train)
proba = clf.predict_proba(x_test) # (n_test, n_classes), columns in clf.classes_ order
fit does not train weights. It fits each ensemble member's preprocessing on the training rows, which then serve as context at prediction time. To reproduce the benchmark (downloads the OpenML tasks):
uv run python scripts/tabpfn_v2/eval.py --suite classification \
--classifier-path hf://aiden-jeon/minipfn-tabpfn-v2-classifier
Add --one-hot off,power,all to also score the other one-hot modes. The headline numbers stay those of the default mode.
The checkpoints from the Results table are kept as branches of this repo. Each branch holds the weights, config and a short README that points back here; this card on main describes all of them.
| Branch | Weights | Mean ROC AUC |
|---|---|---|
step-100k |
sha256:52d1a1cbdfa7 |
0.9175 |
step-200k |
sha256:cba2d1645afc |
0.9225 |
step-300k |
sha256:8921c9aa5e01 |
0.9208 |
step-400k |
sha256:a0e20b918710 |
0.9197 |
main (500k) |
sha256:8642571d2504 |
0.9238 |
clf = TabPFNv2Classifier("aiden-jeon/minipfn-tabpfn-v2-classifier@step-100k")
In the benchmark script, write the branch after @: --classifier-path hf://aiden-jeon/minipfn-tabpfn-v2-classifier@step-100k.
model.safetensors: weightsconfig.json: model size (CellTransformerConfig fields) and taskimages/: figures used in this cardApache-2.0. The training data were generated with the TabICL prior (BSD-3-Clause); no TabICL code is included here.
@article{hollmann2025tabpfn,
title = {Accurate predictions on small data with a tabular foundation model},
author = {Hollmann, Noah and M{\"u}ller, Samuel and Purucker, Lennart and Krishnakumar, Arjun and K{\"o}rfer, Max and Hoo, Shi Bin and Schirrmeister, Robin Tibor and Hutter, Frank},
journal = {Nature},
volume = {637},
pages = {319--326},
year = {2025},
doi = {10.1038/s41586-024-08328-6}
}
@inproceedings{qu2025tabicl,
title = {{TabICL}: A Tabular Foundation Model for In-Context Learning on Large Data},
author = {Qu, Jingang and Holzm{\"u}ller, David and Varoquaux, Ga{\"e}l and Le Morvan, Marine},
booktitle = {International Conference on Machine Learning},
year = {2025}
}