Instructions to use Manik2000/v4finbench-tabpfn with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- TabPFN
How to use Manik2000/v4finbench-tabpfn 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
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,161 +1,110 @@
|
|
| 1 |
---
|
| 2 |
-
license: other
|
| 3 |
-
license_name: priorlabs
|
| 4 |
-
license_link: LICENSE
|
| 5 |
tags:
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
- datasets-and-benchmarks
|
| 14 |
-
library_name: tabpfn
|
| 15 |
---
|
| 16 |
|
| 17 |
-
#
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
-
|
|
|
|
| 22 |
|
| 23 |
-
|
| 24 |
|
| 25 |
-
|
| 26 |
|
| 27 |
-
|
|
| 28 |
-
|---|---
|
| 29 |
-
| `
|
| 30 |
-
| `
|
| 31 |
-
| `
|
| 32 |
-
| `
|
| 33 |
-
| `
|
| 34 |
-
| `
|
| 35 |
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
-
##
|
| 39 |
|
| 40 |
-
|
|
|
|
| 41 |
|
| 42 |
-
|
| 43 |
|
| 44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
-
-
|
| 47 |
-
|
| 48 |
-
- Czech Republic
|
| 49 |
-
- Slovakia
|
| 50 |
|
| 51 |
-
|
| 52 |
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
Typical uses include:
|
| 60 |
-
|
| 61 |
-
- reproducing V4FinBench benchmark results;
|
| 62 |
-
- evaluating the released checkpoints on the V4FinBench test folds;
|
| 63 |
-
- comparing new tabular models against the fine-tuned TabPFN baselines;
|
| 64 |
-
- studying transfer to related corporate distress or bankruptcy prediction datasets.
|
| 65 |
-
|
| 66 |
-
## Out-of-scope use
|
| 67 |
-
|
| 68 |
-
These models are not intended for production credit scoring, lending decisions, investment decisions, regulatory decisions, or automated decision-making about real companies.
|
| 69 |
-
|
| 70 |
-
The models should not be used as the sole basis for financial, legal, or business decisions.
|
| 71 |
-
|
| 72 |
-
## Dataset
|
| 73 |
-
|
| 74 |
-
The models were fine-tuned on **V4FinBench**, a corporate distress benchmark containing 1,106,879 company-year observations from 203,900 companies across the V4 economies.
|
| 75 |
-
|
| 76 |
-
The benchmark includes six prediction horizons:
|
| 77 |
-
|
| 78 |
-
| Horizon | Total instances | Positive cases | Negative cases |
|
| 79 |
-
|---:|---:|---:|---:|
|
| 80 |
-
| 0 years | 1,000,087 | 3,587 | 996,500 |
|
| 81 |
-
| 1 year | 996,500 | 3,054 | 993,446 |
|
| 82 |
-
| 2 years | 898,692 | 2,374 | 896,318 |
|
| 83 |
-
| 3 years | 793,234 | 1,896 | 791,338 |
|
| 84 |
-
| 4 years | 700,041 | 1,485 | 698,556 |
|
| 85 |
-
| 5 years | 598,832 | 1,154 | 597,678 |
|
| 86 |
-
|
| 87 |
-
Dataset and code:
|
| 88 |
-
|
| 89 |
-
- Kaggle: https://www.kaggle.com/datasets/sebastiantomczak10/v4-group-corporate-bankruptcy/data
|
| 90 |
-
- GitHub: https://github.com/genwro-ai/V4FinBench
|
| 91 |
-
|
| 92 |
-
## Distress definition
|
| 93 |
-
|
| 94 |
-
A company is labeled as financially distressed if, in its final available annual report, it simultaneously satisfies all three criteria:
|
| 95 |
-
|
| 96 |
-
1. **Solvency:** equity / total assets < 0
|
| 97 |
-
2. **Profitability:** EBITDA / total assets < 0
|
| 98 |
-
3. **Liquidity:** current assets / current liabilities < 0.6
|
| 99 |
-
|
| 100 |
-
This label captures financial distress rather than formal legal bankruptcy. The criterion is designed to identify companies with simultaneous deterioration in solvency, profitability, and liquidity.
|
| 101 |
|
| 102 |
-
##
|
| 103 |
-
|
| 104 |
-
V4FinBench provides six derived binary classification tasks for horizons `h = 0, 1, 2, 3, 4, 5`.
|
| 105 |
-
|
| 106 |
-
For each horizon `h`, distressed companies have their final `h` years of data removed, and the resulting final observation receives a positive label. Other company-year observations are assigned a negative label.
|
| 107 |
-
|
| 108 |
-
Each model in this repository was fine-tuned on one horizon-specific task.
|
| 109 |
-
|
| 110 |
-
## Fine-tuning procedure
|
| 111 |
-
|
| 112 |
-
The models were initialized from a pretrained TabPFN checkpoint and fine-tuned separately for each prediction horizon using the same imbalance-aware context construction strategy.
|
| 113 |
-
|
| 114 |
-
Because V4FinBench is severely imbalanced, with only about 0.19–0.36% positive cases depending on the horizon, uniformly sampled TabPFN contexts contain very few positive examples. To address this, fine-tuning uses prototype undersampling:
|
| 115 |
-
|
| 116 |
-
1. All minority-class examples are retained.
|
| 117 |
-
2. Majority-class examples are clustered with MiniBatchKMeans.
|
| 118 |
-
3. One real majority example closest to each cluster centroid is selected.
|
| 119 |
-
4. The resulting context uses an approximately 7:3 majority-to-minority ratio.
|
| 120 |
-
|
| 121 |
-
This preserves minority-class signal while keeping a representative structure of the non-distressed majority population.
|
| 122 |
-
|
| 123 |
-
## Training configuration
|
| 124 |
-
|
| 125 |
-
| Hyperparameter | Value |
|
| 126 |
-
|---|---:|
|
| 127 |
-
| Learning rate | 5e-6 |
|
| 128 |
-
| Epochs | 10 |
|
| 129 |
-
| Batch size | 1024 |
|
| 130 |
-
| Meta batch size | 1 |
|
| 131 |
-
| Inference context size | 10,000 |
|
| 132 |
-
| Loss | Cross entropy |
|
| 133 |
-
| Hardware | Single NVIDIA A100 GPU |
|
| 134 |
|
| 135 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
|
| 137 |
## License
|
| 138 |
|
| 139 |
-
These
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
Built with PriorLabs-TabPFN.
|
| 144 |
-
|
| 145 |
-
These checkpoints are fine-tuned derivatives of TabPFN. They were modified by the V4FinBench authors and are not official Prior Labs releases. They are not endorsed, approved, or validated by Prior Labs.
|
| 146 |
|
| 147 |
## Citation
|
| 148 |
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
TBA
|
| 152 |
-
|
| 153 |
-
Please also cite:
|
| 154 |
-
```bibtex
|
| 155 |
-
@article{hollmann2025tabpfn,
|
| 156 |
-
title={TabPFN: A Tabular Foundation Model},
|
| 157 |
-
author={Hollmann, Noah and others},
|
| 158 |
-
year={2025}
|
| 159 |
-
}
|
| 160 |
-
```
|
| 161 |
-
|
|
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
| 2 |
tags:
|
| 3 |
+
- tabular
|
| 4 |
+
- tabpfn
|
| 5 |
+
- bankruptcy-prediction
|
| 6 |
+
- financial-distress
|
| 7 |
+
- finance
|
| 8 |
+
datasets:
|
| 9 |
+
- sebastiantomczak10/v4-group-corporate-bankruptcy
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# V4FinBench TabPFN Checkpoints
|
| 13 |
|
| 14 |
+
Finetuned [TabPFN v2](https://github.com/PriorLabs/TabPFN) checkpoints for
|
| 15 |
+
corporate financial distress prediction on V4FinBench. We release one
|
| 16 |
+
checkpoint per prediction horizon (h = 0, …, 5), each trained with the
|
| 17 |
+
**prototype-undersampling** context-construction strategy that performs
|
| 18 |
+
best in our experiments.
|
| 19 |
|
| 20 |
+
- **Dataset (Kaggle):** <https://www.kaggle.com/datasets/sebastiantomczak10/v4-group-corporate-bankruptcy/data>
|
| 21 |
+
- **Code (GitHub):** <https://github.com/genwro-ai/V4FinBench>
|
| 22 |
|
| 23 |
+
## What's in this repo
|
| 24 |
|
| 25 |
+
Six TabPFN v2 checkpoints, one per V4FinBench horizon task:
|
| 26 |
|
| 27 |
+
| File | Horizon | Description |
|
| 28 |
+
|---|---|---|
|
| 29 |
+
| `tabpfn_h0.ckpt` | h = 0 | Current-year financial distress |
|
| 30 |
+
| `tabpfn_h1.ckpt` | h = 1 | One-year-ahead distress |
|
| 31 |
+
| `tabpfn_h2.ckpt` | h = 2 | Two-year-ahead distress |
|
| 32 |
+
| `tabpfn_h3.ckpt` | h = 3 | Three-year-ahead distress |
|
| 33 |
+
| `tabpfn_h4.ckpt` | h = 4 | Four-year-ahead distress |
|
| 34 |
+
| `tabpfn_h5.ckpt` | h = 5 | Five-year-ahead distress |
|
| 35 |
|
| 36 |
+
Each checkpoint is the per-horizon model selected by maximizing
|
| 37 |
+
$F_1$-score on the validation fold, finetuned from the pretrained
|
| 38 |
+
TabPFN v2 base with imbalance-aware in-context construction (clustered
|
| 39 |
+
majority prototypes paired with all minority examples).
|
| 40 |
|
| 41 |
+
## Loading checkpoints
|
| 42 |
|
| 43 |
+
See the V4FinBench code repository for loading and inference:
|
| 44 |
+
<https://github.com/genwro-ai/V4FinBench>
|
| 45 |
|
| 46 |
+
## Training details
|
| 47 |
|
| 48 |
+
- **Base model:** TabPFN v2
|
| 49 |
+
- **Finetuning:** Adam, 10 epochs, learning rate 5e-6, batch size 1024,
|
| 50 |
+
inference context size 10,000.
|
| 51 |
+
- **Context construction:** prototype undersampling — for each context,
|
| 52 |
+
all minority-class examples are retained; majority-class examples are
|
| 53 |
+
selected by clustering with MiniBatchKMeans and keeping the real
|
| 54 |
+
observation closest to each centroid, until
|
| 55 |
+
$N_{\text{min}} / N_{\text{maj}} = 0.3$.
|
| 56 |
+
- **Hardware:** single NVIDIA A100 GPU per run.
|
| 57 |
+
- **Folds:** 5-fold company-grouped, country-stratified
|
| 58 |
+
cross-validation. The released checkpoint per horizon is the
|
| 59 |
+
best-performing fold by validation $F_1$.
|
| 60 |
|
| 61 |
+
Full configuration, evaluation protocol, and per-fold results are
|
| 62 |
+
documented in the paper and in the GitHub code repository.
|
|
|
|
|
|
|
| 63 |
|
| 64 |
+
## Scope of this release
|
| 65 |
|
| 66 |
+
This repository contains a curated subset of the checkpoints produced
|
| 67 |
+
in the paper. The full reference experiments produce 90 checkpoints
|
| 68 |
+
total (6 horizons × 5 folds × 3 context-construction strategies);
|
| 69 |
+
reproducing them is fully supported by the released folds and training
|
| 70 |
+
code in the GitHub repository.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
+
## Intended use
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
|
| 74 |
+
These checkpoints are intended for:
|
| 75 |
+
|
| 76 |
+
- Benchmarking corporate financial-distress prediction methods on
|
| 77 |
+
V4FinBench under the released evaluation protocol.
|
| 78 |
+
- Research on tabular foundation models, in-context learning under
|
| 79 |
+
severe class imbalance, and cross-dataset transfer in financial
|
| 80 |
+
prediction (e.g., the American Bankruptcy Dataset transfer experiment
|
| 81 |
+
in the paper).
|
| 82 |
+
|
| 83 |
+
## Limitations and responsible use
|
| 84 |
+
|
| 85 |
+
- These checkpoints are **research artifacts**, not production
|
| 86 |
+
risk-scoring models. They are not intended for, and should not be
|
| 87 |
+
used to make, individual credit decisions, supplier-risk decisions,
|
| 88 |
+
or any other automated decisions about specific companies without
|
| 89 |
+
additional jurisdiction-specific validation, fairness analysis, and
|
| 90 |
+
human oversight.
|
| 91 |
+
- V4FinBench labels capture composite financial distress (joint
|
| 92 |
+
deterioration in solvency, profitability, and liquidity), not
|
| 93 |
+
formal legal bankruptcy filings. Predictions reflect the operational
|
| 94 |
+
distress definition in the paper and may not generalize to other
|
| 95 |
+
distress or bankruptcy definitions.
|
| 96 |
+
- Training data covers four Central European economies (Poland,
|
| 97 |
+
Hungary, Czech Republic, Slovakia) over 2006–2021. Performance on
|
| 98 |
+
other economies, accounting standards, or time periods is not
|
| 99 |
+
guaranteed; see the cross-dataset transfer analysis in the paper for
|
| 100 |
+
one external evaluation point.
|
| 101 |
|
| 102 |
## License
|
| 103 |
|
| 104 |
+
These checkpoints are derivatives of TabPFN v2 and are released under
|
| 105 |
+
the TabPFN license included in this repository (`LICENSE`). Please
|
| 106 |
+
review the license terms before use.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
|
| 108 |
## Citation
|
| 109 |
|
| 110 |
+
A citation entry will be added once the preprint is available.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|