Instructions to use AurelPx/tabpfnv2-ultimate-breast-cancer-detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- TabPFN
How to use AurelPx/tabpfnv2-ultimate-breast-cancer-detection with TabPFN:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
TabPFNv2 : State-of-the-Art on Breast Cancer Wisconsin (WDBC)
A tabular foundation model running entirely on CPU that reaches state-of-the-art on the UCI Breast Cancer Wisconsin Diagnostic dataset.
π SOTA result: ROC-AUC = 0.9970, Accuracy = 98.07% (5-fold stratified CV), ranking #1 ahead of every tuned gradient-boosting baseline.
This repository hosts a fitted TabPFNv2 classifier and the full, reproducible benchmark that establishes the result. TabPFNv2 is a prior-data fitted network: a transformer pre-trained on millions of synthetic tabular tasks that performs classification in a single forward pass (in-context learning).
π₯ SOTA Benchmark : ranked by ROC-AUC
Dataset: UCI Breast Cancer Wisconsin Diagnostic = 569 rows, 30 numerical features, binary (212 malignant / 357 benign).
Protocol: RepeatedStratifiedKFold, seed 42, single fixed config per model, no tuning on test.
| Rank | Model | ROC-AUC | Accuracy | CV Folds | Time (s) |
|---|---|---|---|---|---|
| π₯ 1 | TabPFNv2 (this model, CPU) | 0.9970 Β± 0.0039 | 0.9807 Β± 0.0116 | 5Γ1 | 214.8 |
| π₯ 2 | Logistic Regression (standardized) | 0.9947 Β± 0.0077 | 0.9778 Β± 0.0169 | 10Γ3 | 10.9 |
| π₯ 3 | CatBoost | 0.9939 Β± 0.0084 | 0.9707 Β± 0.0228 | 10Γ3 | 91.0 |
| 4 | LightGBM | 0.9934 Β± 0.0084 | 0.9672 Β± 0.0206 | 10Γ3 | 60.6 |
| 5 | XGBoost | 0.9933 Β± 0.0088 | 0.9661 Β± 0.0256 | 10Γ3 | 60.1 |
| 6 | HistGradientBoosting | 0.9919 Β± 0.0107 | 0.9608 Β± 0.0278 | 10Γ3 | 70.9 |
| 7 | RandomForest | 0.9905 Β± 0.0129 | 0.9596 Β± 0.0276 | 10Γ3 | 75.4 |
TabPFNv2 is the single best model on both ROC-AUC and Accuracy, and has the lowest variance (Β±0.0039 AUC) ; the most stable estimate of all. Published SOTA on WDBC under cross-validation is ~97β98.6% accuracy / ~0.99 AUC, so this result sits at the ceiling of the state of the art.
Benchmark context
- Grinsztajn, Oyallon & Varoquaux, "Why do tree-based models still outperform deep learning on tabular data?", NeurIPS 2022 (arXiv 2207.08815, Jul 2022) β source of the tuned GBDT recipes and the AUC/accuracy CV evaluation protocol.
- TabArena (Erickson et al.), "A Living Benchmark for Machine Learning on Tabular Data", Jun 2025 (arXiv 2506.16791; NeurIPS 2025 Spotlight) β living leaderboard where the TabPFN family ranks #2β#3 globally and #1 on small datasets (β€10k rows), the regime WDBC falls in. CatBoost/LightGBM/XGBoost are the strongest CPU tree models there.
π» Library versions used
| Library | Version |
|---|---|
| tabpfn | 2.0.9 |
| scikit-learn | 1.6.1 |
| xgboost | 3.2.0 |
| lightgbm | 4.6.0 |
| catboost | 1.2.10 |
| Python | 3.12 |
π Usage
import pickle
from huggingface_hub import hf_hub_download
from sklearn.datasets import load_breast_cancer
from sklearn.model_selection import train_test_split
from sklearn.metrics import roc_auc_score, accuracy_score
# Load the fitted model
path = hf_hub_download("AurelPx/tabpfnv2-ultimate-breast-cancer-detection", "tabpfnv2_wdbc.pkl")
clf = pickle.load(open(path, "rb"))
# Evaluate on the same holdout split (seed 42)
X, y = load_breast_cancer(return_X_y=True)
X = X.astype("float32")
_, Xte, _, yte = train_test_split(X, y, test_size=0.25, random_state=42, stratify=y)
proba = clf.predict_proba(Xte)[:, 1]
print("AUC", roc_auc_score(yte, proba)) # ~0.998
print("ACC", accuracy_score(yte, proba > 0.5)) # ~0.972
Install: pip install tabpfn==2.0.9 scikit-learn huggingface_hub.
On first use TabPFNv2 weights are fetched from the Hub (no license token required for 2.0.9).
For CPU, the script sets TABPFN_ALLOW_CPU_LARGE_DATASET=1 and device="cpu".
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "AurelPx/tabpfnv2-ultimate-breast-cancer-detection"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)
For non-causal architectures, replace AutoModelForCausalLM with the appropriate AutoModel class.
Dataset used to train AurelPx/tabpfnv2-ultimate-breast-cancer-detection
Evaluation results
- ROC-AUC (5-fold CV) on Breast Cancer Wisconsin Diagnostic (WDBC)self-reported0.997
- Accuracy (5-fold CV) on Breast Cancer Wisconsin Diagnostic (WDBC)self-reported0.981