TabRet: Pre-training Transformer-based Tabular Models for Unseen Columns

Soma Onishi, Kenta Oono, Kohei Hayashi

TL;DR

Transfer learning for tabular data typically falls apart when downstream tasks feature new, unseen columns—especially when column names lack rich text descriptions. TabRet solves this by combining masked autoencoding and column shuffle augmentation during pre-training with a novel intermediate retokenizing step. By calibrating newly added column embeddings on downstream data before supervised fine-tuning, TabRet significantly outperforms tree-based models and self-supervised tabular baselines on low-data downstream tasks.

What Problem Does This Paper Address?

While pre-trained foundation models dominate natural language processing and computer vision, tabular data has lagged behind. A major obstacle is column mismatch: unlike text (which uses a universal vocabulary) or images (fixed pixel grids), tabular datasets vary wildly in their schema across tasks. A model pre-trained on one table cannot easily process a downstream table containing columns it has never encountered.

Recent attempts use large language models (LLMs) to bridge this gap by encoding natural-language column names and descriptions. However, real-world data often lacks informative metadata—column names may be masked, anonymized, or arbitrary codes. TabRet tackles the problem of transferring pre-trained tabular representations to downstream tables containing ~50% unseen columns without relying on textual side information or semantic column descriptions.

Methods

TabRet adapts the masked autoencoder (MAE) framework to tabular architectures using a three-phase approach:

[Pre-training]               [Retokenizing]               [Fine-Tuning]
Masked Autoencoding          Train ONLY new column         Freeze backbone;

+ Column Shuffle Aug.  --->  tokenizers on downstream ---> train target head 
(All parameters trained)     unlabeled data (MAE loss)    as a masked column
  1. Model Architecture:
  2. Feature Tokenizers: Embed numerical features via linear projection and categorical features via lookup tables.
  3. Encoder & Post-Encoder: A Transformer encoder processes unmasked column tokens, followed by a post-encoder that inserts learnable column positional embeddings and [mask] tokens for dropped features.
  4. Projectors: Dedicated linear heads map representations back to original column domains to compute reconstruction loss.
  5. Pre-training with Shuffle Augmentation:
  6. Uses masked column modeling (default 70% masking ratio).
  7. In addition to standard masking, the authors introduce column-wise shuffle augmentation: randomly permuting the values of 10% of columns across the minibatch to break spurious inter-feature correlations and force the model to learn robust cross-column interactions.
  8. Retokenizing (The Novel Step):
  9. When encountering a downstream table with new columns, the pre-trained encoder, post-encoder, and existing tokenizers are frozen.
  10. Newly initialized tokenizers, positional embeddings, and projectors are introduced for unseen columns and trained using masked reconstruction loss on the downstream features. This leverages feature-to-feature supervision rather than overfitting the small downstream sample to a single target label.
  11. Target-as-Mask Fine-tuning:
  12. Instead of appending a classification [cls] token, the target label $y$ is treated as an additional masked column entry, training only its positional embedding and projection layer.

Datasets

  • Pre-training Data:
  • BRFSS (Behavioral Risk Factor Surveillance System): U.S. public health telephone survey data (2011–2015), preprocessed into a single table with 2.03 million rows and 74 columns.
  • Downstream Healthcare Evaluation (Out-of-Distribution Columns):
  • Four Kaggle binary classification datasets: Diabetes, HDHI (Heart Disease Health Indicator), PKIHD (Personal Key Indicator of Heart Disease), and Stroke. Each exhibits approximately 50% column overlap with BRFSS.
  • Evaluated in a sample-constrained regime: only 100 data points were used for retokenizing and fine-tuning.
  • IID Benchmarks: Standard tabular datasets (Adult, Bank Marketing, HTRU2, Online Shoppers) evaluated under identical column distributions.

Key Insights and Ideas

  • Reconstruction is a denser learning signal than a single label: Supervised fine-tuning of new column embeddings on tiny datasets (e.g., $N=100$) quickly causes overfitting. Retokenizing avoids this by utilizing multi-column reconstruction loss to warm up newly added tokenizers.
  • Decoders shouldn't be discarded in tabular transfer: Unlike computer vision MAEs (which discard the decoder after pre-training because pretext inpainting differs from downstream classification), TabRet reuses the decoder in downstream phases since tabular pretext and downstream tasks both operate over column relationships.
  • Batch shuffling acts as structural regularization: Shuffling a fraction of columns within a minibatch prevents the self-attention mixer from latching onto brittle column co-occurrences.

Key Results

TabRet was compared against supervised baselines (Logistic Regression, XGBoost, CatBoost, MLP, FT-Transformer) and self-supervised models (SCARF, TransTab) over 20 random seeds:

  • Top Performance Across All Benchmarks (Test AUC):
  • Diabetes: TabRet achieved 79.94% (vs. XGBoost 79.52%, TransTab 78.30%).
  • HDHI: TabRet achieved 81.65% (vs. SCARF 80.36%, XGBoost 80.29%).
  • PKIHD: TabRet achieved 82.70% (vs. SCARF 81.01%, TransTab 78.56%).
  • Stroke: TabRet achieved 80.73% (vs. SCARF 76.74%, FT-Transformer 76.48%, XGBoost 69.02%).
  • Stability: TabRet exhibited lower variance across random seeds compared to tree and DL baselines on tiny fine-tuning sets.
  • Ablation Gains: Starting from a supervised TabRet baseline (average AUC gain: baseline), adding pre-training provided +3.07, adding shuffle augmentation increased the gain to +3.21, and including retokenizing achieved the highest overall average gain of +3.87.

Limitations and Future Work

  • Domain Relevance Dependency: TabRet relies on shared structure across tables. In preliminary experiments with zero column overlap from unrelated domains, performance fell below standard supervised baselines.
  • Manual Feature Alignment: The downstream evaluation required manually matching column naming conventions and value representations (e.g., converting continuous ages to match BRFSS categorical bins).
  • Small Datasets in IID Settings: On standard small IID benchmark datasets without massive pre-training data, supervised FT-Transformer remained highly competitive or superior, showing that self-supervised pre-training requires substantial table scale to shine.

Summary updated

BibTeX
@inproceedings{onishi2023tabret,
  author = {Soma Onishi and Kenta Oono and Kohei Hayashi},
  title = {{TabRet: Pre-training Transformer-based Tabular Models for Unseen Columns}},
  booktitle = {ME-FoMo @ ICLR},
  year = {2023},
  url = {https://openreview.net/forum?id=qnRlh8BdMY},
}
Figure