arXiv:2610.07559cs.LGOct 2026

Manuscript Offprint

arXiv:2610.07559

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 Zhang

ABSTRACT

Recent progress in tabular foundation models suggests that training on synthetic tasks can substantially improve in-context learning capabilities, with overall performance largely depending on how well models can infer task-specific predictive relationships from the available context during inference. In this paper, we introduce TAFFY, a tabular foundation model with an In-Context Diversity Prior and a Task-Conditioned Looped Transformer that strengthen this ability. Specifically, to construct each synthetic pretraining context, the In-Context Diversity Prior samples from multiple related environments derived via controlled interventions and distribution shifts on a shared causal process. This in-context diversity encourages the model to learn a more comprehensive and task-specific representation. Moreover, the Task-Conditioned Looped Transformer iteratively and selectively applies a shared group of Transformer blocks to refine contextual representations, with a task-conditioned gate modulating the final hidden-state update. This enables task-adaptive iterative refinement. Together, these components encourage the model to identify predictive relationships from contextual contrasts during pretraining and dynamically modulate context integration for each task. Across six classification and five regression benchmark datasets, TAFFY attains the lowest average rank.

1 INTRODUCTION

Tabular foundation models leverage in-context learning (ICL) to predict query labels from labeled support examples without explicit parameter updates. Prior-data fitted networks formulate this paradigm as approximating Bayesian inference under a task prior: synthetic tasks provide support-query pairs, and pretraining optimizes query predictions conditioned on the support set (Müller et al., 2022). Recent architectures such as TabPFN, TabICL, LimiX, and Mitra have advanced tabular ICL through developments in synthetic data generation and prediction architectures (Hollmann et al., 2023; 2025; Qu et al., 2025; 2026; Zhang et al., 2025a; Wang et al., 2026; Zhang et al., 2025b). Because semantic meanings and feature dependencies shift across datasets, a model cannot rely on fixed feature semantics; instead, it must infer task-specific functional dependencies directly from the support context—an intuition formalized by recent kernel and nearest-neighbor views of tabular ICL (Koshil et al., 2025; Miftachov et al., 2026). Consequently, generalization to unseen tasks depends on how effectively the model learns task-specific predictive relationships from context.

To strengthen this ability, we introduce TAFFY, which combines an In-Context Diversity Prior for synthetic task construction with a Task-Conditioned Looped Transformer for task-dependent context processing. First, the In-Context Diversity Prior incorporates observations from multiple related environments into a single synthetic pretraining context. Starting from a randomly sampled causal prototype, we first generate a set of environments through controllable distribution shifts (Zhang et al., 2015) and interventions (Pearl, 2009), then combine their support data and query data to form one prediction task. This design is inspired by causal discovery under changing distributions (Huang et al., 2020a) and latent-variable learning with auxiliary information (Hyvärinen et al., 2019), which allow the model to explore a sufficient amount of variation across different data generation conditions. Although the model is not provided with environment identifiers or access to the generating process, the mixing prior enables observations from related conditions which provides contrasting

Figure

(a) OpenML

(b) BCCO

(c) TALENT

(d) Training-data efficiency

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.

evidence about predictive relationships. Training on these contrasts encourages TAFFY to infer task-specific predictive relationships from the available context.

Second, the Task-Conditioned Looped Transformer combines a looped transformer stack with a task-specific gate to strengthen the model's ability to learn task-specific predictive relationships from context. Building on representations produced by the column and row encoders, our model repeatedly applies a shared ICL Transformer stack (Dehghani et al., 2019; Yang et al., 2024) to further integrate information from the labeled context. Later passes recompute attention using representations already informed by support features and labels, allowing them to build on information integrated earlier. Since the usefulness of further refinement may vary across tasks, we introduce a task-conditioning module that maps support-dataset statistics to a task-dependent scalar gate modulating the final hidden-state update. The shared loop enables iterative context processing, while the gate adjusts how strongly the final refinement contributes to prediction with the number of passes held fixed. Since these feature and label statistics are computed solely from the labeled support and unlabeled query dataset, this task-dependent refinement is also applicable when inferring predictive relationships for unseen real-world tasks. Together, the in-context diversity prior provides relational evidence, while the task-conditioned looped Transformer refines the tabular representations.

We evaluate TAFFY across six classification and five regression benchmark suites. Using Taffy-4L throughout the classification evaluation, TAFFY obtains the lowest average rank on all six classification suites; the regression model ranks first on all five regression suites. Figure 1(a–c) shows selected foundation models on OpenML-CC18, BCCO, and TALENT, with the full comparison in Table 1. Figure 1(d) compares TAFFY with reproduced TabICLv2 (Qu et al., 2026) across measured pretraining budgets, providing an exploratory view of pretraining data efficiency. Section 5.4 defines the cumulative maximum-feature-element budget and reports the measured checkpoints.