Abstract
Tabular data prediction is a fundamental machine learning task for many applications. Existing methods predominantly employ discriminative modeling and operate under the assumption of a fixed target column, necessitating re-training for every new predictive task. Inspired by the generative power of large language models (LLMs), this paper exploits the idea of building universal tabular data predictors based on generative modeling, namely UniPredict. Here, we demonstrate the scalability of an LLM to extensive tabular datasets, enabling it to comprehend diverse tabular inputs and predict target variables following the provided instructions. Specifically, we train a single LLM on an aggregation of 169 tabular datasets with diverse targets and compare its performance against baselines that are trained on each dataset separately. We observe this versatile UniPredict model demonstrates an advantage over other models, ranging from 5.4% to 13.4%, when compared with the best tree-boosting baseline and the best neural network baseline, respectively. We further test UniPredict in few-shot learning settings on another 62 tabular datasets. Our method achieves strong performance in quickly adapting to new tasks. In low-resource few-shot setup, we observed a 100%+ performance advantage compared with XGBoost, and significant margin over all baselines. We envision that UniPredict sheds light on developing a universal tabular data prediction system that learns from data at scale and serves a wide range of prediction tasks.
Introduction
Tabular data prediction is a cornerstone of machine learning, yet traditional approaches remain siloed. Discriminative models like XGBoost or TabNet are typically task-specific; a model trained for one target variable cannot easily adapt to another without complete retraining. This "one-model-per-task" paradigm creates significant overhead in real-world applications where hundreds of predictive tasks may coexist.
UniPredict proposes a shift toward universal tabular data predictors based on generative modeling. By leveraging the semantic understanding of Large Language Models (LLMs), UniPredict treats tabular classification as a text-to-text generation task guided by natural language instructions.
Methodology
The UniPredict framework transforms tabular data into a format suitable for LLMs through three primary stages:
- Prompt Engineering and Serialization: Raw metadata is cleaned and reformatted using GPT-3.5 to create natural language descriptions. Individual data rows are then "serialized" into descriptive strings (e.g., "Age is 33; Gender is Female"), allowing the model to process them as text.
- Target Augmentation: To improve robustness, the model is not trained solely on hard labels. Instead, a "helper" XGBoost model generates probability distributions for training labels, providing "soft" targets that convey a sense of confidence during the fine-tuning process.
- Instruction Fine-Tuning: A GPT-2 backbone is fine-tuned to ingest metadata, serialized rows, and specific task instructions (e.g., "Predict the probability of each class for cancer relapse") to output structured probability distributions.
The researchers evaluated two variants: UniPredict-heavy, which utilizes full metadata, and UniPredict-light, which uses only feature names, to isolate the impact of semantic context.
Experimental Setup
The model was trained and evaluated on an extensive collection of datasets sourced from Kaggle:
- Supervised Learning: 169 diverse tabular datasets comprising over 366,000 samples were used for training and initial evaluation.
- Few-Shot Learning: 62 additional, previously unseen datasets were used to test the model's ability to generalize to new domains with minimal examples.
Results
UniPredict demonstrates significant advantages over specialized baselines:
- Universal Performance: On the 169 test datasets, UniPredict-heavy achieved an average accuracy of 0.81, a 5.4% relative improvement over XGBoost and a 13.4% improvement over FT-Transformer.
- Few-Shot Dominance: In low-resource scenarios (using only 10% of training data), UniPredict-heavy outperformed XGBoost by 118%, highlighting the power of the LLM's pre-trained "common sense."
- Efficiency: A single UniPredict model successfully handled 169 different tasks, a feat that would traditionally require 169 separate models.
Discussion and Limitations
While UniPredict marks a significant step forward, several challenges remain:
- Context Window Constraints: Large datasets with many columns can exceed the LLM's context window, leading to data truncation.
- Data Quality: The model is sensitive to "noisy" feature values (e.g., unformatted numerical strings) and vague metadata.
- Numerical Processing: LLMs still face hurdles with high-precision numerical data compared to specialized tree-based models.
Conclusion
UniPredict showcases the potential of LLMs as universal tabular classifiers. By moving from discriminative to generative modeling, it offers a scalable solution for multi-task environments and excels in data-scarce regimes. Future research will focus on scaling to larger backbones and extending the framework to regression tasks.
Summary updated