From Supervised to Generative: A Novel Paradigm for Tabular Deep Learning with Large Language Models

Xumeng Wen, Han Zhang, Shun Zheng, Wei Xu, Jiang Bian

TL;DR

This paper introduces Generative Tabular Learning (GTL), a framework that adapts Large Language Models (LLMs) for tabular data by continuing their pre-training on a massive collection of diverse datasets formatted as text. The resulting model, LLaMA-GTL, achieves state-of-the-art zero-shot and in-context learning performance, outperforming traditional specialized models like XGBoost in few-shot scenarios and rivaling GPT-4.

What Problem Does This Paper Address?

Predictive modeling on tabular data (think spreadsheets with rows and columns) is the backbone of industries like finance and healthcare. Traditionally, this relies on specialized models like Gradient Boosting Decision Trees (GBDTs) or specific neural networks that must be trained or fine-tuned for every new task.

However, these models struggle with "universal" capabilities: they can't easily transfer knowledge between different domains, they require significant labeled data to perform well, and they can't follow natural language instructions. While LLMs excel at these "foundation model" traits in text and vision, they often fail to grasp the nuances of tabular data—such as numerical sequences and statistical dependencies—when simply prompted out of the box.

Methods

The authors propose Generative Tabular Learning (GTL), which treats tabular prediction as a generative language task. The core process involves:

  1. Data Construction: Converting raw tabular data into "instruction-oriented" text. They developed three primary templates:
  2. T-lang: Converts features into natural language sentences (e.g., "The age of the individual is 25").
  3. T-table: Uses Markdown tables to represent data, which is more token-efficient for multiple examples.
  4. T-anony: A "knowledge-free" version that removes metadata, testing the model's pure statistical learning.
  5. Continued Pre-training: They took LLaMA-2 (7B and 13B) and continued pre-training it on 340 diverse tabular datasets. The training objective is standard next-token prediction, but specifically masked to focus on learning the relationship between features and targets.
  6. In-Context Learning (ICL): By including labeled examples in the prompt, the model performs a form of implicit Bayesian inference to adapt to new, unseen tasks without any parameter updates.
Overview of the GTL framework, showing data construction, pre-training, and adaptation to downstream tasks.

Datasets

The study utilizes a massive collection of 384 public tabular datasets curated from Kaggle, spanning domains like healthcare, finance, and retail.

  • Training: 340 datasets were used for the GTL pre-training phase.
  • Evaluation: 44 "holdout" datasets (20 classification, 24 regression) were kept strictly separate to test the model's ability to generalize to entirely new domains and schemas.
Distribution of the 384 datasets across various industrial domains.

Key Insights and Ideas

  • The Generalization Gap: During training, the model's performance on seen datasets (in-domain) continues to improve, but its zero-shot performance on unseen datasets (out-of-domain) plateaus early. This suggests that "early stopping" is crucial to maintain a universal model that hasn't overfitted to specific training schemas.
  • Scaling Laws for Tables: Scaling the number of tasks (diverse datasets) is more effective for improving generalization than simply increasing the number of samples per task. Furthermore, increasing the model size (from 7B to 13B) yields significant performance boosts.
  • Template Sensitivity: The best way to represent data depends on the context. T-lang is superior for zero-shot classification because it leverages the LLM's prior semantic knowledge. However, for in-context learning with many examples, T-table is better because it is more token-efficient and helps the model see patterns across rows.
Impact of different templates on performance as the number of in-context examples increases.

Key Results

  • Few-Shot Superiority: LLaMA-GTL achieves state-of-the-art performance in "extremely few-shot" cases (≤ 32 samples). It consistently outperforms traditional models like XGBoost and LightGBM when data is scarce.
  • Rivaling GPT-4: Despite being much smaller and open-source, LLaMA-13B-GTL surpassed GPT-4 in many classification tasks and significantly narrowed the gap in regression tasks.
  • Zero-Shot Capability: Unlike many specialized tabular models (like TabPFN) that require examples to work, GTL can make reasonable predictions with zero examples just by understanding the feature names and task description.
Generalization behaviors during GTL optimization, showing the convergence of in-domain and out-of-domain performance.

Limitations and Future Work

  • Token Efficiency: Representing tables as text is computationally expensive and hits the context window limits of LLMs quickly, restricting the number of "shots" (examples) that can be provided.
  • Computational Cost: Running inference on a 13B parameter LLM is significantly slower and more resource-intensive than running a forest of trees (XGBoost).
  • Future Directions: The authors suggest exploring "conversational tabular learning," where a user can refine a model's prediction through dialogue, and improving the interpretability of LLM-based tabular predictions by asking the model to generate explanations alongside its answers.

Summary updated

BibTeX
@inproceedings{wen2024from,
  author = {Xumeng Wen and Han Zhang and Shun Zheng and Wei Xu and Jiang Bian},
  title = {{From Supervised to Generative: A Novel Paradigm for Tabular Deep Learning with Large Language Models}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2024},
  doi = {10.1145/3637528.3671975},
}
Figure