Tabular foundation models such as TabPFN and TabICLv2 do not learn by updating weights. They "learn in context": the labelled training rows are fed into a transformer as part of the input, and the model predicts new rows in a single forward pass. These models are often strong on small and medium tables, but they have two practical problems. First, they are slow and need a GPU at prediction time. Second, they can only read about a thousand rows at once, which is a hard limit on how much data the model ever sees. Recent work compresses these models into fast gradient-boosted trees. The compressed students are just as opaque as the teacher, though, which is a poor fit for credit, clinical or audit settings where tabular models are actually deployed.
We propose to distill a tabular foundation model into an additive model: a sum of one-dimensional shape curves, one per feature, plus a small number of two-feature curves. This kind of model can be printed on a page and checked by a domain expert. Training uses a two-part loss. The first part matches the teacher's out-of-fold probabilities on real rows. The second part matches the teacher's per-feature effect curves, which can be computed directly by editing the teacher's prompt. Where these two targets pull the student in opposite directions, the disagreement tells us which feature pairs need their own interaction term. Each student is fit on the full dataset, while its labels come from many separate teacher context windows. The student is therefore also a way to pool what the teacher learns across contexts it could never read all at once.
Core Claim
The claim has three parts, and each can be tested. First, an additive student distilled this way keeps most of the accuracy of the opaque distilled tree student, and is clearly better than the same additive model trained on hard labels alone. Second, the student's shape curves agree with the teacher's exact in-context explanations far better than an additive model fit without the teacher. Third, the disagreement between the two loss terms is a useful signal for choosing interactions: it picks better feature pairs than standard interaction search on hard labels, at the same interaction budget.
We are careful about what the second loss term is. Under independent features, matching a teacher's partial-dependence curve is mathematically the same as matching its soft labels on synthetic rows drawn from a product of the feature marginals. The explanation term is therefore not a new kind of signal. It is soft-label matching on a deliberately chosen query distribution. The open question is what happens when features are correlated. In that case, matching soft labels on real rows and matching marginal effect curves give different additive models. We want to know which one is more accurate and more faithful, and whether the gap between them can be put to use.
Research Program
The teacher is TabPFNv2 or TabICLv2. The student has the form $g(x) = b + \sum_j g_j(x_j) + \sum_{(j,k)\in S} g_{jk}(x_j,x_k)$. Here $g_j$ are binned or spline shape curves in logit space, and $S$ is a small set of allowed feature pairs. The loss is
$$\mathcal{L} = \lambda_h\,\mathrm{CE}(y, g(x)) + \lambda_s\,\mathrm{KL}\big(p_T^{\text{oof}}(x)\,\|\,\sigma(g(x))\big) + \lambda_m \sum_j \mathbb{E}_{x_j}\big[(g_j(x_j) - \bar f_j(x_j))^2\big].$$
In this loss, $p_T^{\text{oof}}(x)$ is the teacher's predicted distribution for row $x$, computed with $x$ held out of the context. $\sigma$ is the softmax. $\bar f_j$ is the teacher's centered partial-dependence curve for feature $j$ in logit space. The weights $\lambda_h, \lambda_s, \lambda_m$ balance the three terms.
The out-of-fold soft-label term follows Pocket Foundation Models. That paper showed that an in-context teacher queried on rows already in its prompt collapses to near one-hot predictions, and that distilling those outputs makes the student worse than training on hard labels. Its fix was stratified out-of-fold labelling, and we reuse it. The curves $\bar f_j$ are computed with the batched partial-dependence machinery of Interpretable Machine Learning for TabPFN. That paper observed that because a forward pass plays the role of training, effect curves and leave-one-covariate-out importance can be computed exactly by editing the prompt. In our setting those computations become distillation targets, not end products.
When a dataset is larger than the context limit, we do not compress it into one optimized prompt. That is what In-Context Data Distillation with TabPFN does, producing synthetic rows nobody can read and leaving the heavy forward pass in place. Instead, each held-out row is labelled by averaging the teacher over several random contexts of about 1,024 rows drawn from the other folds. The parametric student is then fit on all rows, so it can absorb information no single context contains.
The multi-objective part does real work in one place. The Direction 1 literature treats gradient conflict between loss terms as a failure to remove, either by making the losses take the same mathematical form (Huang et al.) or by matching the distillation loss to how the student learns its representations (Chen et al.). We read the conflict differently. For each feature $j$, we track the cosine between the gradients of the soft-label term and the effect-curve term, restricted to the parameters of $g_j$. If this cosine stays negative, the teacher's behaviour on real rows cannot be explained by a curve in $x_j$ alone, which means some interaction involving $j$ is missing. We then pick a partner $k$ using the teacher's exact two-way partial dependence, also computed by editing the prompt, and add $g_{jk}$ to $S$. We repeat until the interaction budget is used.
This differs from DiXtill, which adds a fixed-weight term aligning a student's attention with the teacher's attributions. It also differs from KED, which matches the outputs of a teacher built from hand-grouped feature subnetworks. Both methods regularize a neural student. Neither yields a model whose whole function can be read off, and neither deals with in-context teachers.
A second line of work tests something the literature has not checked. Out-of-fold labelling was shown to fix collapsed soft labels, but it is unknown whether the teacher's explanations also degrade when computed with the explained rows inside the context. We will compute per-row leave-one-covariate-out attributions and effect curves both ways, in context and out of fold. We then measure how their stability across resampled contexts and their agreement with held-out effects differ. If attributions computed in context are distorted, every pipeline that explains in-context models on their own training data has a problem. If they are not distorted, the cheaper in-context computation can be used for the effect-curve term.
Baselines
The naive reference is an additive model of the same form, with the same number of bins and the same interaction budget, trained on hard labels with standard interaction search. This is the "no teacher" point. Every distilled variant has to beat it on AUC to justify using the teacher at all. A tuned CatBoost on hard labels gives the opaque accuracy reference.
The strongest existing method is the Pocket distilled XGBoost student, built with its own out-of-fold recipe and mixed loss. Pocket Foundation Models reports a macro-mean AUC of 0.882 for TabICLv2-XGB across its 153-dataset suite. That figure is 96.5% of the teacher's AUC, and the student beat tuned CatBoost on 51% of datasets. We do not expect an additive model to beat it. Success means recovering at least half of the AUC gap between the hard-label additive model and this opaque student while staying fully readable. We have found no reported result on Lacuna for a distilled additive or explainable-boosting student on these suites, so that gap will be measured, not assumed.
For datasets above the context limit, the comparison point is TabPFN with in-context data distillation. In-Context Data Distillation with TabPFN reports a median AUC of 0.967 on 48 TabZilla datasets, against 0.951 for TabPFN with random subsampling and 0.953 for default XGBoost. Coming within about 0.01 median AUC of the 0.967 figure on that suite, with orders of magnitude lower latency, would count as a meaningful result.
All methods see identical folds and teacher checkpoints. Every student, Pocket's included, gets the same hyperparameter search budget. We report several seeds, because Pocket used only one.
Ablations isolate each ingredient. We drop the effect-curve term. We replace it with soft-label matching on an equal number of synthetic rows drawn from the data distribution, which is the dense-augmentation control. We use a single random context instead of pooling several. We use in-context teacher labels instead of out-of-fold labels. Finally, we replace conflict-guided interaction selection with hard-label interaction search at the same budget.
Why not just…?
Why not just fit the additive model on hard labels? If the teacher adds nothing that an additive learner can absorb, this is the honest answer, and the naive baseline will show it. The evidence that teachers help constrained students comes from other settings. Distillation lifted a non-linear concept-bottleneck model from 82.27% to 85.47% on ImageNet100 in Rethinking Concept Bottleneck Models, and out-of-fold soft labels gave trees +0.011 AUC over tuned CatBoost on datasets with fewer than 21 features in Pocket Foundation Models. Neither result is about additive students, so the first experiment settles it directly.
Why not just distill soft labels into the additive model, Pocket-style, with no effect-curve term? This is the most serious threat. With independent features it is nearly the same as our method. We expect the two to differ only under correlated features. There, fitting soft labels on real rows lets one feature's curve absorb effects that belong to a correlated neighbour, while the effect-curve term ties each curve to the teacher's marginal behaviour. The drop-the-term ablation, broken down by measured feature correlation, decides this. If the term helps neither accuracy nor faithfulness anywhere, we will drop it and keep only the conflict-based interaction selection, which still needs both targets.
Why not just add dense teacher-labelled synthetic rows? As noted above, effect-curve matching is soft-label matching on product-distribution queries. The real question is which query distribution to use, not whether to add an "explanation loss". The augmentation control compares data-distribution queries with product-distribution queries at matched teacher-call budgets.
Why not just keep the teacher and explain it post hoc? Prompt-editing explanations from Interpretable Machine Learning for TabPFN are exact, but the model being explained still runs on a GPU, and context curation by Data Shapley there needed roughly 10,000 forward passes. More fundamentally, a post-hoc explanation describes a model nobody can inspect directly. An additive student is the explanation.
Proposed Experiments
We run on the 153-dataset suite from Pocket Foundation Models, with OpenML-CC18 and TabZilla as subsets so results connect to both prior papers. We report AUC, CPU latency, and the sparsity measures from Multi-Objective Optimization of Performance and Interpretability: number of features used, number of interactions, and number of non-monotone curves. Faithfulness is measured as the correlation between each student curve $g_j$ and the teacher's out-of-fold effect curve $\bar f_j$, and as the rank agreement between student feature importance and the teacher's exact leave-one-covariate-out importance.
Four checks decide the proposal. The first is whether the distilled additive student recovers at least half of the AUC gap to the Pocket XGBoost student, measured across seeds with a Wilcoxon test. The second is whether the effect-curve term beats the dense-augmentation control on correlated-feature datasets and ties it elsewhere, as the analysis above predicts. The third is whether conflict-guided pairs beat hard-label interaction search at budgets of 5 and 10 pairs. The fourth is whether in-context attributions show measurable distortion relative to out-of-fold attributions.
We also report results separately for datasets with fewer and more than 21 features. Pocket's gain over CatBoost shrinks to +0.001 AUC above 21 features. One hypothesis is that much of the teacher's advantage there sits in interactions, and that a budget-limited additive student, though readable, cannot capture them. If that is right, it is a real limit of the method, and we will report it as one.
References
- Pocket Foundation Models: Distilling TFMs into CPU-Ready Gradient-Boosted Trees
- Interpretable Machine Learning for TabPFN
- In-Context Data Distillation with TabPFN
- Harmonizing Knowledge Transfer in Neural Network with Unified Distillation
- How to Make Cross Encoder a Good Teacher for Efficient Image-Text Retrieval?
- Xai-driven knowledge distillation of large language models for efficient deployment on low-resource devices
- Improving Knowledge Distillation with Teacher's Explanation
- Rethinking Concept Bottleneck Models: From Pitfalls to Solutions
- Multi-Objective Optimization of Performance and Interpretability of Tabular Supervised Machine Learning Models