Tabular Transfer Learning via Prompting LLMs

Jaehyun Nam, Woomin Song, Seong Hyeon Park, Jihoon Tack, Sukmin Yun, Jaehyung Kim, Kyu Hwan Oh, Jinwoo Shin

TL;DR

Transfer learning on tabular data has historically struggled because different tables rarely share the same columns and feature spaces. Prompt to Transfer (P2T) overcomes this by serializing tabular data into text and leveraging Large Language Models (LLMs) via in-context learning. By identifying the source table column most correlated with the target label and converting source rows into predictive "pseudo-demonstrations," P2T enables training-free, zero-shot and few-shot tabular transfer learning.

What Problem Does This Paper Address?

In domains like computer vision and natural language processing, pre-training and transfer learning are standard tools for handling limited labeled data. In the tabular domain, however, transfer learning is notoriously tricky: datasets are heterogeneous, featuring completely different columns, data types, and feature dimensions. Transferring knowledge from an unlabeled dataset or a dataset with an entirely different schema (e.g., predicting diabetes using general medical or lifestyle data) typically requires cumbersome feature alignment, heuristic mapping, or complex model architectures.

While recent approaches serialize tables into text so LLMs can process them, these have primarily focused on standard few-shot prompting without exploiting external data sources. The authors ask: Can LLMs act as training-free transfer modules that transfer knowledge from unlabeled or heterogeneous tabular sources into a target task?

Methods

P2T introduces an in-context learning (ICL) pipeline that extracts and transfers proxy relationships from a source dataset $D^s$ (unlabeled or heterogeneous) to a target dataset $D^t$:

  1. Correlation Identification via LLM:
    Given few-shot target examples, P2T prompts the LLM to identify which column feature $f_k$ in the source dataset is most correlated with the target label $f_{\text{target}}$. The LLM uses both semantic priors (understanding the meaning of column headers like "Insulin" vs. "Diabetes") and numerical patterns to pick the best proxy target feature.

  2. Pseudo-Demonstration Construction:
    P2T treats the chosen source feature $f_k$ as a proxy target and the remaining source columns as inputs. It serializes source rows into natural language question-answer pairs (e.g., predicting Insulin level from BMI and Age).

  3. Inference with Augmented Prompts:
    The final prompt concatenates:

  4. Overall task description $p_{\text{task}}(D^t)$

  5. Source pseudo-demonstrations $p_{\text{pseudo}}(D^s, f_k)$
  6. Target labeled demonstrations $p_{\text{label}}(D^t)$ (omitted in zero-shot settings)
  7. The test query $p_{\text{test}}(x_{\text{test}}^t)$
    The model makes predictions directly in an in-context manner without updating parameters.
[Task Description] + [Pseudo-Demonstrations from Source] + [Few-Shot Target Examples] + [Target Query] -> LLM Prediction

Datasets

The authors evaluate P2T on 17 tabular datasets from OpenML and Kaggle previously established in tabular LLM literature:

  • Datasets: Heart-c, Breast, TAE, Hamster, Customers, Pollution, Diabetes, Car, BTC, Haberman, Caesarian, VC, Adult, Credit-g, Credit-R, Electricity, Credit-A, and Salaries.
  • Regression evaluation: Evaluated on Laptops, Choles, and House datasets.
  • No new benchmarks were created; the paper focuses on repurposing standard tabular benchmarks into zero-shot, few-shot, and cross-dataset transfer scenarios.

Key Insights and Ideas

  • Tables share semantics even when schemas mismatch: While numerical models (e.g., CatBoost) see incompatible feature matrices, LLMs map diverse tabular schemas into a unified linguistic space.
  • Predicting correlated features acts as a proxy task: Predicting a strongly correlated source column (e.g., insulin) from other features mirrors the causal reasoning needed to predict the target label (e.g., diabetic status).
  • Selection matters: Selecting the target column randomly for pseudo-demonstrations often hurts performance—falling below baseline models that use no transfer data at all (as seen on the Haberman dataset). Identifying truly correlated features via LLM semantic reasoning is essential.
  • Inherent resilience to missing data: Unlike traditional methods that require imputation, P2T handles missing values by simply omitting those feature names from the prompt sentences, leading to minimal performance degradation when 50% of values are omitted.

Key Results

  • Zero-Shot Transfer: LLMs often struggle in zero-shot tabular prediction (e.g., scoring 46.00% on binary Credit-g, worse than random guessing). Injecting P2T pseudo-demonstrations from a heterogeneous source (Credit-A) boosted accuracy to 62.00%, and from unlabeled Credit-g data to 68.00% (Table 1).
  • Few-Shot Classification (Table 2):
  • 1-Shot: P2T averaged 64.92% accuracy across 12 datasets, beating the previous LLM baseline LIFT-ICL (58.10%) and state-of-the-art few-shot method STUNT (55.53%). P2T took top accuracy on all 12 datasets.
  • 5-Shot: P2T achieved 70.52% average accuracy, compared to LIFT-ICL's 63.89% and CatBoost's 60.83%.
  • Cross-Dataset Heterogeneous Transfer (Table 3): On the Adult dataset with Credit-R as source, P2T steadily scaled from 74.67% ($N=0$ extra samples) to 80.00% ($N=10$). In contrast, baselines that zero-pad non-overlapping features degraded as source samples were added.
  • Model Scaling: Moving from GPT-3.5 to GPT-4 consistently improved downstream P2T results (e.g., from 74.32% to 89.77% on Customers).

Limitations and Future Work

  • Context Window / Token Limits: High-dimensional tabular datasets (tables with dozens or hundreds of columns) lead to excessively long textual serializations, easily hitting LLM context limits or driving up API costs.
  • Numerical and Regression Tasks: P2T's performance gains were much smaller on continuous regression tasks (Table 5) compared to classification, due to LLMs' well-known difficulties with fine-grained arithmetic and numerical interpolation.
  • Feature Selection Scalability: Future work includes exploring LLM-based feature subsampling to handle wide tables more efficiently.

Summary updated

BibTeX
@inproceedings{nam2024tabular,
  author = {Jaehyun Nam and Woomin Song and Seong Hyeon Park and Jihoon Tack and Sukmin Yun and Jaehyung Kim and Kyu Hwan Oh and Jinwoo Shin},
  title = {{Tabular Transfer Learning via Prompting LLMs}},
  booktitle = {COLM},
  year = {2024},
  url = {https://openreview.net/forum?id=bo4pauxnIR},
}

Loading related content...

Figure