Tabular Foundation Models for Weighted Regression and Classification
Junwen Xia, Yan He, Dehan Kong, Zhenhua Lin
arXiv:2611.29789v1Weighted regression and classification show up in a surprisingly wide range of problems. They appear in survey sampling, missing-data analysis, distribution shift, causal inference, learning from unreliable measurements, insurance pricing, and even particle physics. The common thread is simple: not every observation should count equally. Sometimes some examples are more representative of the target population, sometimes they are more reliable, and sometimes they need to be reweighted to correct for selection bias or treatment assignment bias. That makes the learning problem fundamentally different from ordinary regression or classification. This paper is about making modern tabular foundation models work in that weighted setting. Why does that matter? Because today, if you want to do weighted regression or weighted classification with a flexible nonlinear model, you usually have to fit and tune a separate model on each new dataset. That is manageable for a linear model or a generalized linear model, but it becomes expensive when you want the flexibility of trees, boosted ensembles, or neural networks. And the cost is not just training time. It is repeated hyperparameter tuning, repeated implementation effort, and repeated model selection for every dataset you encounter. Tabular foundation models offer a different paradigm. Instead of fitting a new model from scratch on each dataset, you pretrain a Transformer once on many synthetic datasets. Then, when a new dataset arrives, the model uses the observed examples as context and makes predictions directly, without task-specific parameter updates. Recent models such as TabPFN-3.5 have shown that this can be very competitive on ordinary unweighted tabular prediction. But until now, these models were not built to use sample weights. If the weights matter to the target you care about, ignoring them means learning the wrong quantity. To understand the issue, it helps to recall the basic targets. In standard unweighted regression with squared loss, the optimal prediction is the conditional mean of Y given X. In weighted regression, the optimal prediction becomes a weighted conditional mean, where the response is averaged with the weights included. In weighted multiclass classification, the optimal decision rule depends on weighted class probabilities rather than ordinary class probabilities. So the weights are not a minor detail; they change the population target itself. The paper’s main idea is to adapt a pretrained tabular Transformer so it can learn these weighted targets through in-context learning. The authors develop a general pipeline with three ingredients. First, they create synthetic weighted tasks for pretraining. Interestingly, they do this entirely from missing-data problems. The intuition is that missing-data correction naturally produces inverse-probability weights, so it gives a principled way to generate many weighted regression and classification tasks. These synthetic tasks are used to teach the model what to do with weights, even if the eventual downstream task is not literally a missing-data problem. Second, they modify the Transformer architecture with weighted attention. In plain language, this means the model can pay attention to examples in a way that incorporates the sample weights rather than treating all context points equally. Third, they train with a normalized weighted loss. This ensures the learning objective matches the weighted prediction problem rather than collapsing back to the unweighted one. They apply this pipeline to TabPFN-3.5 and obtain what they call WeightedPFN. According to the paper, this is the first tabular foundation model pretrained specifically for weighted regression and classification. The fine-tuning step is modest: about half an hour on a single NVIDIA H100 GPU. After that, the model can make weighted predictions on new datasets without further fitting or hyperparameter optimization. The methodology starts from a general weighted learning formulation. The data consist of covariates X, response Y, and a nonnegative weight W. For regression, Y is real-valued; for classification, Y takes one of K classes. The goal is to minimize the expected weighted loss, E[W times loss]. For squared loss, the population minimizer is the weighted conditional mean E[WY|X=x] divided by E[W|X=x]. For weighted classification, the optimal class is the one maximizing the weighted conditional class probability. This is the formal reason a model must explicitly use the weights if it is to solve the right problem. The synthetic pretraining tasks come from missing-data prediction. In the regression version, some covariates and possibly the response are missing. A complete case is one where all required values are observed. Because complete cases can differ systematically from the original population, the complete-case distribution may be biased. Under standard missingness assumptions, inverse-probability weights correct that bias. So the model is trained on complete cases with weights that reflect the probability of being observed. The same idea extends to classification. The paper then reserves a different family of tasks for evaluation: treatment-selection problems built from randomized-experiment datasets. These are used as out-of-distribution tests, because they are weighted causal tasks rather than missing-data tasks. The point is to see whether a model trained only on synthetic missing-data weights can transfer that capability to a different weighted setting. There is also a theoretical contribution. The authors analyze a weighted Transformer with softmax attention and GELU activations, which makes the theory closer to the architectures actually used in tabular foundation models than older idealized analyses. Under smoothness, boundedness, and task-coverage assumptions, and with sufficient pretraining resources, they show that the model can achieve the classical nonparametric minimax rate for weighted regression on new datasets, namely n to the negative 2s over 2s plus d, where s is smoothness and d is dimension. In the special case where all weights are one, this recovers ordinary in-context regression. So the theory helps explain why pretrained Transformers can work well on new tabular datasets without task-specific fitting. The experiments are extensive. The authors evaluate on 110 real regression datasets and 156 real classification datasets for missing-data prediction. They also test out-of-distribution causal tasks built from 78 real randomized-experiment datasets. Across these two families, they examine both prediction quality and runtime. The headline empirical result is that WeightedPFN performs strongly on real datasets in both settings. In the missing-data problems, it works well for both regression and classification. In the causal tasks, it generalizes well even though those tasks were not used for pretraining. Just as importantly, its runtime is comparable to linear models and much lower than tuned nonlinear methods. That matters because one of the major selling points of tabular foundation models is not only accuracy, but also the ability to avoid repeated fitting and tuning. What do these results actually show? First, the weighted adaptation is effective: the model is not merely a repackaged unweighted predictor, because it can exploit sample weights to solve problems where the target changes with the weighting scheme. Second, pretraining on synthetic missing-data tasks is enough to transfer useful weighted-learning behavior to other weighted problems, at least in the tested causal setting. Third, the in-context paradigm can preserve the speed advantages of tabular foundation models even when the task is weighted. There are, of course, limitations. The pretraining strategy relies on synthetic tasks derived from missing-data prediction, so the success of transfer to other weighted problems is empirical rather than guaranteed in every possible domain. The theory is also asymptotic and depends on smoothness, boundedness, and coverage assumptions, so it should be read as a principled explanation rather than a complete characterization of practical performance. And while the experiments cover many datasets, weighted learning is a broad area, and there will certainly be settings with more complex weighting structures or stronger distribution shift where further adaptation is needed. Still, the overall message is clear. This paper shows that tabular foundation models can be extended from ordinary prediction to weighted prediction in a way that is both practically useful and theoretically grounded. Instead of fitting a new weighted model from scratch every time, you can pretrain once, use weights directly in context, and get fast predictions that respect the actual statistical target. For applications like missing-data correction and causal decision-making, that is a meaningful step forward.
Also spotted that day
Previous daily papers