LLM Empowered Prototype Learning for Zero and Few-Shot Tasks on Tabular Data

Peng Wang, Dongsheng Wang, He Zhao, Hangting Ye, Dandan Guo, Yi ChangarXiv 2025 · OpenReview

Abstract

Recent breakthroughs in large language models (LLMs) have opened the door to in-depth investigation of their potential in tabular data modeling. However, effectively utilizing advanced LLMs in few-shot and even zero-shot scenarios is still challenging. To this end, we propose a novel LLM-based prototype estimation framework for tabular learning. Our key idea is to query the LLM to generate feature values based example-free prompt, which solely relies on task and feature descriptions. With the feature values generated by LLM, we can build a zero-shot prototype in a training-free manner, which can be further enhanced by fusing few-shot samples, avoiding training a classifier or finetuning the LLMs. Thanks to the example-free prompt and prototype estimation, ours bypasses the constraints brought by the example-based prompt, providing a scalable and robust framework. Extensive experiments demonstrate the effectiveness of ours in zero and few-shot tabular learning.

Introduction

Tabular data is the backbone of industries like finance and healthcare, yet it lacks the natural sequential structure found in text or images, making it difficult for standard deep learning models. While Large Language Models (LLMs) have shown promise in "In-Context Learning" (ICL) for tabular tasks, they face three major hurdles: scalability due to limited context windows, privacy risks from including real data in prompts, and a performance gap in zero-shot scenarios where no labeled examples are available.

To address these gaps, we propose ProtoLLM, a novel framework that moves away from example-based prompting toward example-free prototype learning. By turning LLMs into "prototype estimators," we can build robust classifiers without the need for extensive data or model fine-tuning.

Methodology

ProtoLLM operates in four main steps to build class-specific prototypes using LLM-derived knowledge:

  1. Example-Free Feature Generation: Instead of providing raw data examples, the system queries the LLM with task descriptions and feature metadata. The LLM infers likely feature values for each class (e.g., typical age ranges for specific income brackets).
  2. Feature Importance Weighting: The LLM is queried to assign weights to features, identifying which columns are most discriminative for the specific task.
  3. Prototype Construction:
    • Zero-Shot: A prototype vector for each class is constructed using the LLM-generated values, weighted by importance scores.
  4. Few-Shot: If labeled samples are available, the LLM-generated "prior" is fused with the empirical mean of these samples to create a more robust prototype.
  5. Training-Free Inference: Classification is performed by calculating the Euclidean distance between a new test sample and the class prototypes. This process requires no backpropagation or fine-tuning.
The ProtoLLM framework: from feature value generation via LLM to prototype construction and classification.

Experimental Setup

The framework was evaluated across 10 diverse tabular datasets, covering finance, medicine, and agriculture. These include classic benchmarks like Adult and Bank, as well as high-dimensional datasets like Arrhythmia (279 features) and multi-class problems like Soybean (19 classes). This variety ensures the framework's robustness across different data scales and domains.

Key Insights

  • LLMs as Knowledge Repositories: LLMs contain significant domain knowledge about common tabular tasks, allowing them to conceptualize class profiles (e.g., a diabetic patient) without seeing specific dataset rows.
  • Decomposition for Stability: By querying the model feature-by-feature rather than for entire rows, ProtoLLM simplifies the reasoning task and improves prediction stability.
  • Efficiency: ProtoLLM uses significantly fewer tokens than "per-sample" prompting methods because it only interacts with the LLM during the initial prototype construction phase.

Results

ProtoLLM demonstrates superior performance in both zero-shot and few-shot regimes. In zero-shot settings, it achieved an average rank of 1.3 across datasets, significantly outperforming other LLM-based methods. In few-shot scenarios (4, 8, and 16 shots), it consistently outperformed traditional machine learning models (XGBoost, MLP) and specialized few-shot learners like TabPFN.

Comparison of AUC (%) for ProtoLLM (ours) against various baselines across 4, 8, and 16-shot scenarios.

Conclusion

ProtoLLM provides a scalable, robust, and privacy-preserving framework for tabular data classification. While highly effective in general domains, future work will focus on improving performance in highly specialized niches and exploring more complex distance metrics for prototype matching.

Summary updated

BibTeX
@misc{wang2025llm,
  author = {Peng Wang and Dongsheng Wang and He Zhao and Hangting Ye and Dandan Guo and Yi Chang},
  title = {{LLM Empowered Prototype Learning for Zero and Few-Shot Tasks on Tabular Data}},
  year = {2025},
  eprint = {2508.09263},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.09263},
}
Figure