TAFFY: A Task-Adaptive Tabular Foundation Model with In-Context Diversity

Zijian Li, Xiangchen Song, Gongxu Luo, Jie Qiao, Ruichu Cai, Zhenhao Chen, Xinshuai Dong, Fan Feng, Guangyi Chen, Kun ZhangarXiv 2026

TL;DR

TAFFY is a new tabular foundation model that achieves state-of-the-art performance by training on synthetic tasks that mix multiple causally-related environments. By combining this "In-Context Diversity Prior" with a looped Transformer architecture that uses task-specific gating, TAFFY attains the lowest average rank across 11 major classification and regression benchmarks.

What Problem Does This Paper Address?

Tabular data is the backbone of many industries, yet it remains a "final frontier" for foundation models. Unlike text or images, tabular datasets have no fixed vocabulary; feature meanings and dependencies shift wildly from one dataset to the next.

Recent "Prior-Data Fitted Networks" (like TabPFN) address this by using In-Context Learning (ICL). They are trained on millions of synthetic tasks to predict labels for new data points simply by looking at a small "support set" of examples, without any parameter updates. However, these models often struggle to infer complex, task-specific relationships when the data distribution shifts. The authors of TAFFY aim to bridge this gap by making models more adaptive to the unique statistical "fingerprint" of every new task they encounter.

Methods

TAFFY introduces two primary innovations to the standard tabular foundation model pipeline:

  1. In-Context Diversity Prior: During pretraining, instead of generating a single synthetic dataset for one task, TAFFY creates a mixture of related "environments." Starting from a shared causal graph, the generator applies various distribution shifts (like changing label proportions) and interventions (changing how specific features are calculated). By seeing these different versions of the same underlying process within a single context, the model learns to identify stable predictive relationships through contrast.
  2. Task-Conditioned Looped Transformer: The model uses a "looped" architecture, where the same set of Transformer blocks is applied repeatedly (e.g., 4 times) to refine the data representations. Crucially, they add a Task-Condition Gate. This module calculates simple statistics from the support set (like means, variances, and class counts) and uses them to produce a scalar value that modulates the final update of the model's hidden states. This allows the model to dynamically adjust how much "refinement" is needed for a specific task.
Figure 2: The pretraining pipeline of TAFFY combines the in-context diversity prior with the task- conditioned looped transformer. (a) In-Context Diversity Prior proceeds through three steps: base- table generation, multiple-environment construction, and context assembly. (b) Column and row encoders produce representations for a looped Transformer, whose final update is modulated by a support-derived task gate before query prediction.

Datasets

The model is pretrained entirely on synthetic data generated from causal priors. For evaluation, the authors used a massive battery of real-world benchmarks:

  • Classification: OpenML-CC18, BCCO, PFN, TALENT, TabArena, and TabZilla.
  • Regression: BCCO, CTR23, PFN, TALENT, and TabArena.

These suites cover hundreds of diverse datasets, ranging from medical records to physical sensor data.

Key Insights and Ideas

  • Learning from Contrast: The "aha moment" of the Diversity Prior is that a model learns better when it sees how a relationship changes under different conditions. By pooling data from shifted environments into one task, the model is forced to find the functional dependencies that actually matter for prediction across those shifts.
  • Iterative Refinement is Not One-Size-Fits-All: The authors found that while deeper (looped) models generally perform better, the optimal number of loops varies by task. The task-specific gate acts as a "soft" version of early stopping or adaptive depth, letting the model tune its internal reasoning process to the complexity of the input data.
  • Pretraining Efficiency: TAFFY is remarkably efficient. It achieves higher accuracy than previous state-of-the-art models (like TabICLv2) even when restricted to the same pretraining data budget.

Key Results

TAFFY's performance is dominant across the board. It achieved the lowest average rank on all 11 benchmark suites tested.

  • Classification: On the TALENT benchmark, TAFFY reached an average rank of 3.73, significantly outperforming TabPFN3 (4.62) and TabICLv2 (4.59).
  • Regression: The results were even more pronounced in regression, where TAFFY achieved a rank of 2.45 on TALENT, compared to 3.48 for TabPFN3.
  • Ablation Studies: Removing either the Diversity Prior or the Looped Transformer led to a clear drop in performance, confirming that both components are essential to TAFFY's success.
Figure 1: Predictive performance and pretraining-data efficiency. (a–c) Average accuracy ranks on OpenML-CC18, BCCO, and TALENT using the ranking pools of Table 1 (lower is better; rank axes start at 2). (d) Accuracies on TALENT classification datasets versus cumulative maximum feature elements. Markers denote measured checkpoints connected by lines; the grey line marks TabICLv2’s best measured accuracy.

Limitations and Future Work

While highly effective, TAFFY's task conditioning is relatively simple—it uses a single scalar gate for the entire task. The authors suggest that finer-grained gating (e.g., different refinement strengths for different features or individual examples) could further improve performance.

Additionally, the current gate doesn't seem to capture certain properties well, such as label entropy or missing value ratios. Developing more sophisticated conditioning architectures that can exploit these specific dataset characteristics is a promising direction for future research in tabular foundation models.

Summary updated

BibTeX
@misc{li2026taffy,
  author = {Zijian Li and Xiangchen Song and Gongxu Luo and Jie Qiao and Ruichu Cai and Zhenhao Chen and Xinshuai Dong and Fan Feng and Guangyi Chen and Kun Zhang},
  title = {{TAFFY: A Task-Adaptive Tabular Foundation Model with In-Context Diversity}},
  year = {2026},
  eprint = {2610.07559},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.07559},
}
Figure