TabMF: Learning Dataset Representations with Tabular Foundation Models

Rafiq Kamel, Nicolas Atienza, Aziz Fouché, Nicola Cancedda, Josif Grabocka

TL;DR

TabMF (Tabular Foundation Model Framework) repurposes pretrained models like TabPFN and TabICL into powerful encoders for entire supervised datasets. By applying contrastive post-training on synthetic data, the authors create fixed-dimensional embeddings that excel at dataset retrieval, distribution-shift monitoring, and benchmark construction, outperforming both hand-crafted meta-features and specialized encoders trained from scratch.

What Problem Does This Paper Address?

In machine learning, we often need to reason about a dataset as a whole rather than just individual rows. For example:

  • Dataset Retrieval: "Find me a dataset similar to this one."
  • Distribution-Shift Monitoring: "Has my production data drifted significantly from my training set?"
  • AutoML: "Which hyperparameters worked best on similar datasets?"

Traditionally, researchers have relied on meta-features—hand-crafted statistics like mean, variance, or class entropy. However, these are rigid and cannot adapt to new tasks. Alternatively, specialized "Dataset2Vec" encoders are trained from scratch, but they fail to leverage the deep structural knowledge captured by modern Tabular Foundation Models (TFMs) that have already seen millions of synthetic tables during their predictive pretraining. TabMF bridges this gap by turning these predictive models into general-purpose dataset representers.

Methods

The authors introduce a framework to adapt TFMs (specifically TabICLv2 and TabPFN-2.5) for dataset-level tasks. The process involves three main steps:

  1. Architecture-Aware Readouts: Since TFMs are designed for instance-level prediction, the authors added specific "readout" layers to aggregate internal states into a single vector. For TabICL, they used a learned summary token; for TabPFN, they implemented a column-aware attention mechanism.
  2. Contrastive Post-Training: The model is trained to recognize that different "views" of the same dataset should have similar embeddings. A "view" is created by stochastically subsampling rows and features or applying label-preserving transformations (like adding noise).
  3. Synthetic Data Prior: Training happens entirely on synthetic datasets generated by a Graph-Structured Causal Model (Graph-SCM). This allows the model to learn a robust geometry of dataset space without needing massive amounts of labeled real-world data.
Figure 1: TABMF overview. Left: A synthetic supervised dataset is sampled from one Graph-SCM, and two stochastic views vary the sampled observations, observed variables, and label-preserving feature transformations while sharing the same designated target. TABMF encodes both views and is trained contrastively to bring their representations together while separating representations of other datasets. Right: At inference time, a frozen TABMF encoder maps a new supervised dataset (X, y) to a fixed-dimensional representation that can be used directly for dataset comparison and monitoring or as input to lightweight downstream probes.

Datasets

  • Training: Synthetic datasets generated on-the-fly using the TabICLv2 Graph-SCM prior (5,000–50,000 rows, up to 100 features).
  • Evaluation: The models were tested on a diverse suite of real-world benchmarks:
  • TabBench: 191 datasets used for view discrimination and property prediction.
  • TabRepo: 144 datasets used for compact benchmark selection.
  • TableShift: 9 tasks used to assess distribution-shift severity.
  • TEmBed/GitTables: Used for supplementary web-table transfer evaluations.

Key Insights and Ideas

  • Emergent Dataset Knowledge: A major finding is that TFMs already possess significant dataset-level understanding before any specific tuning. Simple mean-pooling of a frozen TabPFN's internal states outperformed dedicated learned encoders on retrieval tasks.
  • Supervised Geometry: Unlike target-agnostic table embeddings, TabMF embeddings are "target-aware." If you change the designated target variable ($y$) for the same feature table ($X$), the embedding changes to reflect the new predictive relationship.
  • Robustness to Data Loss: TabMF is remarkably resilient to missing information. Even when only 25% of the original columns are available, the models can still identify the source dataset with high accuracy.
Figure 2: Dataset identity remains recoverable with incomplete features, but robustness depends on the encoder and transformation. (a) Both TABMF variants outperform ICL-mean and PyMFE when only 25% of columns remain. (b) TABMF-PFN better tolerates monotone transformations and standardization, while TABMF-ICL better tolerates heavy noise and missingness; quantization limits both variants. Values are retrieval recall@5; the complete transformation results appear in

Key Results

Across six primary evaluation tasks, the two TabMF variants (based on TabPFN and TabICL) achieved the top two aggregate ranks among all evaluated methods, including classical meta-features (PyMFE) and specialized encoders (Dataset2Vec).

  • Retrieval: TabMF-PFN achieved a near-perfect Recall@5 of 0.965 across 19 different dataset transformations.
  • Distribution Shift: The embeddings showed a high Spearman correlation (up to 0.933) with actual accuracy drops on TableShift, meaning the "distance" in embedding space effectively predicts the severity of a distribution shift.
  • Benchmark Selection: TabMF-PFN was the most effective at selecting a small subset of datasets (e.g., 3 datasets) that accurately represent the performance rankings of the full 144-dataset TabRepo suite.
Table 1: Primary results across six evaluation tasks. Scores are real-data bootstrap AUC, domain macro-OVR AUC, epiplexity regression Spearman, mean retrieval recall@5, TabRepo three-dataset K-means ranking Spearman, and TableShift shift-severity Spearman. Encoders are ordered by their median rank across the six tasks. Higher scores and lower ranks are better; bold marks numeri- cal leaders. Epiplexity uses available-case scores and leakage-controlled PyMFE features; paired common-population results are in Appendix B.4.3.

Limitations and Future Work

  • Task Scope: The current work focuses on classification. Extending the framework to regression datasets is a clear next step.
  • Quantization Sensitivity: The authors noted that both TabMF variants are somewhat sensitive to heavy quantization (binning) of features, where classical meta-features sometimes performed better.
  • Synthetic-to-Real Gap: While the synthetic training transfers well, the authors suggest that incorporating mixtures of real-world datasets during post-training could further improve coverage.
  • Computational Cost: While inference is fast, the models still process the entire table. For extremely large tables, the memory requirements of the TFM backbones (especially TabPFN) remain a factor.

Summary updated

BibTeX
@misc{kamel2026tabmf,
  author = {Rafiq Kamel and Nicolas Atienza and Aziz Fouché and Nicola Cancedda and Josif Grabocka},
  title = {{TabMF: Learning Dataset Representations with Tabular Foundation Models}},
  year = {2026},
  eprint = {2610.13818},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.13818},
}
Figure