Introduction
While Large Language Models (LLMs) have revolutionized text and code, tabular data—the "bread and butter" of industry applications—has remained a difficult frontier. Existing table pre-training methods, such as TAPAS or TaBERT, focus primarily on "Table QA" (answering questions about a table). However, they often neglect tabular prediction, the task of predicting a specific target (like income or house price) based on a set of features.
Furthermore, deep learning models frequently struggle to outperform traditional Gradient Boosted Decision Trees (GBDTs) like XGBoost on tabular tasks. TAPTAP (Table Pre-training for Tabular Prediction) addresses this gap by using the power of pre-trained generative models to "supercharge" traditional models in challenging scenarios like privacy protection, small-data regimes, and missing value imputation.
Methods
TAPTAP treats table rows as a "language" and uses a generative approach based on GPT-2 to master it. The workflow, illustrated in Figure 1, consists of four main stages:
- Pre-training: The model is trained on a massive corpus of 450 diverse public tables (2 million samples). Rows are converted into sentences using Table Serialization (e.g., "Age is 18, Education is HS-grad...").
- Fine-tuning: The pre-trained model is fine-tuned on a specific downstream dataset to learn its unique distribution.
- Data Sampling: The model is prompted to generate new, synthetic feature sets.
- Data Labeling: Crucially, the authors found that LLMs are excellent at generating realistic features but mediocre at predicting labels. TAPTAP solves this by using a high-performing traditional model (like LightGBM) to assign "pseudo-labels" to the synthetic features generated by the LLM.
Technical Innovations
- Character-level Number Encoding: Instead of treating "18" as one token, it is encoded as "1 8". This helps the model understand numerical relationships and magnitudes much better than atomic tokens.
- Permutation Function: Shuffling column order during training prevents the model from relying on fixed sequences, making it more robust for conditional sampling tasks like filling in missing values.
Datasets and Evaluation
The model was pre-trained on a newly compiled collection of 450 public tabular datasets from Kaggle, UCI, and OpenML, totaling nearly 2 million rows. Evaluation was conducted across 12 diverse real-world benchmarks covering classification and regression, including well-known datasets like Adult Income, California Housing, and HELOC.
Key Results and Insights
TAPTAP outperformed 16 baseline methods across 12 datasets in four distinct scenarios: Privacy, Low Resource, Missing Values, and Imbalanced Classes.
Ablation Analysis
The effectiveness of TAPTAP stems from several key components. As shown in Figure 2, removing pre-training, data labeling, or character-level encoding leads to significant performance drops. Pre-training on hundreds of unrelated tables actually helps the model understand the general "structure" of tabular data, leading to better synthetic data generation for a specific target table.
Key Findings
- Privacy Protection: In privacy-sensitive tasks, TAPTAP achieved an average rank of 1.38, significantly outperforming established generators like CTGAN (5.88) or GReaT (3.75).
- Low Resource Gains: When training data was extremely scarce, augmenting the dataset with TAPTAP-generated samples led to substantial accuracy boosts for both Transformers and GBDTs.
- Imputation: TAPTAP proved to be a state-of-the-art engine for filling in missing values by "prompting" the model with known features and letting it predict the missing ones.
Conclusion
TAPTAP shifts the role of the LLM from a "predictor" to a "data factory." By generating high-quality synthetic rows, it allows practitioners to train their favorite models (LightGBM, MLP, etc.) on much larger, augmented datasets. While currently limited by the token length of GPT-2 (restricting it to tables with fewer than 100 columns), it represents a significant step forward in applying generative pre-training to tabular data. Future work may explore scaling to "Web Tables" to further enhance the model's general knowledge.
Summary updated