Mixture of In-Context Prompters for Tabular PFNs

Derek Xu, Olcay Cirit, Reza Asadi, Yizhou Sun, Wei WangarXiv 2024

Abstract

Recent benchmarks found In-Context Learning (ICL) outperforms both deep learning and tree-based algorithms on small tabular datasets. However, on larger datasets, ICL for tabular learning cannot run without severely compromising performance, due to its quadratic space and time complexity w.r.t. dataset size. We propose MIXTUREPFN, which both extends nearest-neighbor sampling to the state-of-the-art ICL for tabular learning model and uses bootstrapping to finetune said model on the inference-time dataset. MIXTUREPFN is the Condorcet winner across 36 diverse tabular datasets against 19 strong deep learning and tree-based baselines, achieving the highest mean rank among Top-10 aforementioned algorithms with statistical significance.

Introduction

Gradient-Boosted Decision Trees (GBDTs) like XGBoost and CatBoost have long dominated tabular data tasks. While deep learning models often struggle to match their performance without extensive tuning, Prior-Fitted Networks (PFNs)—such as TabPFN—have emerged as a powerful alternative. These models utilize In-Context Learning (ICL) to perform Bayesian inference directly within a Transformer's forward pass.

Despite their success, PFNs face a "3,000-sample ceiling." Their quadratic computational complexity ($O(N^2)$) makes them prohibitively slow or memory-intensive for larger datasets. Furthermore, standard PFNs are typically frozen after pretraining, limiting their ability to adapt to specific dataset distributions at inference time. MIXTUREPFN addresses these limitations by introducing a scalable routing strategy and a novel bootstrapping finetuning method.

Methodology

MIXTUREPFN overcomes the scaling and adaptation challenges through two core components:

  1. Sparse Mixture of In-Context Prompters (MICP): To avoid feeding the entire dataset into the Transformer, MICP employs a K-Means-based router to partition the data. For any given test sample, the router selects a specialized "prompter" that focuses on a relevant local neighborhood. This approach reduces inference complexity from quadratic to $O(1)$ space and $O(\log N)$ time.
  2. Context-Aware PFN (CAPFN): To bridge the gap between general pretraining and specific downstream tasks, the authors use bootstrapping. By generating synthetic prompts from the actual inference-time dataset, they finetune the model using lightweight adapters. This process aligns the PFN to the specific data distribution it is currently processing.
Overview of the MIXTUREPFN framework, illustrating the Sparse Mixture of In-Context Prompters (MICP) routing and the Context-Aware PFN (CAPFN) bootstrapping process.

Experimental Evaluation

The framework was evaluated using the TABZILLA benchmark, comprising 36 of the most challenging classification datasets from a pool of 176. These datasets range from 148 to over 1 million samples, covering diverse feature counts and label distributions. MIXTUREPFN was compared against 19 competitors, including GBDTs (XGBoost, CatBoost, LightGBM), Deep Learning models (SAINT, FTTransformer), and classical algorithms (SVM, KNN).

Key Results

  • The Condorcet Winner: MIXTUREPFN emerged as the Condorcet winner, beating every other candidate in head-to-head matchups across the 36-dataset benchmark.
  • Superior Ranking: It achieved the highest mean rank among the Top-10 algorithms, outperforming established GBDTs with statistical significance.
  • Effective Scaling: By utilizing MICP, the model successfully scaled to datasets with over 1 million samples, such as the poker-hand dataset, which was previously inaccessible to standard TabPFN.
Performance improvement (Log Likelihood) of MIXTUREPFN over TabPFN as a function of dataset sample size, demonstrating effective scaling beyond the 3,000-sample limit.

Discussion and Limitations

MIXTUREPFN demonstrates that local context is often sufficient for high-quality Bayesian inference in tabular tasks. Furthermore, "context alignment" via bootstrapping significantly boosts accuracy by specializing the model to the task at hand.

However, some challenges remain. While the model handles large row counts effectively, it still faces computational hurdles with very high feature counts (columns) due to the ensembling required for feature-order invariance. Future work may explore more sophisticated tokenization strategies to improve performance on high-dimensional data and further scale toward billions of samples.

Conclusion

MIXTUREPFN represents a significant step forward for PFNs, enabling them to compete with and often outperform state-of-the-art GBDTs on large-scale tabular datasets. By combining efficient routing with local adaptation, it breaks the traditional scaling barriers of in-context tabular learning.

Summary updated

BibTeX
@misc{xu2024mixture,
  author = {Derek Xu and Olcay Cirit and Reza Asadi and Yizhou Sun and Wei Wang},
  title = {{Mixture of In-Context Prompters for Tabular PFNs}},
  year = {2024},
  eprint = {2405.16156},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.16156},
}
Figure