Paper commentary
When to Trust a PFN: Detecting Harmful Shift in Tabular Foundation Models
CALD detects harmful shift in tabular PFNs by finetuning only the decoder
- Problem Tabular PFNs can lose accuracy silently when deployment data drifts from the support set. Existing shift detectors fire on benign shifts too, and model-disagreement methods assume retrainable classifiers, which PFNs are not.
- Method CALD finetunes only the PFN decoder and flags batches with low anchor loss.
- Results Across 14 datasets on TabPFN and TabICL, CALD matches or outperforms 15 post-hoc baselines on harmful shifts. It also keeps false alarms low on most benign shifts.

Figure 10 :Mechanism M1 on a benign dataset (diabetes_readmission/cald-tabpfn).Per-step trajectories of ∥ge∥2F (left), ⟨ga, ge⟩F (middle), and Lanc(Wt) (right), median across rounds and seeds with interquartile shading. The cross-term diverges between ID (more negative) and OOD (less negative), driving the integratedλ gap = +0.352even though∆ acc =−2.34pp.
Original paper · CC BY 4.0 · Viet Nguyen, Herman Bergström, Stephan Rabanser, Rahul G. Krishnan · When to Trust a PFN: Detecting Harmful Shift in Tabular Foundation Models · Original paper figure · Converted the paper's own image file from its arXiv HTML version to PNG.Why a PFN's failures are hard to see
A tabular PFN answers new classification problems in one forward pass, using a labeled support set as its in-context prompt. Its synthetic priors draw the support and the query from one generative process, so the model expects both to follow the same distribution. When deployment data drifts away from the support set, accuracy can fall without any warning from the model itself.
Label-agnostic covariate-shift tests can flag such drift, but they also fire on benign shifts that leave accuracy intact. Model-disagreement methods are more robust, yet they perturb the weights of a fine-tuned classifier. A PFN's weights stay fixed across tasks, and retraining it is prohibitive and can degrade performance, so those methods don't transfer directly.
Adapting the model is a separate response, and Drift-Resilient TabPFN retrains the prior on synthetic evolving causal models. On the authors' 14-dataset benchmark this did not close the deterioration gap, with mean δOOD of -1.4 percentage points across all datasets.
Finetuning the decoder against its own pseudolabels
CALD keeps the PFN backbone fixed and briefly finetunes only its decoder. The finetune minimizes two terms together: an agreement loss on a labeled anchor set, and a disagreement loss on the evaluation batch measured against the PFN's own pseudolabels. The anchor term acts as a stable in-distribution reference, while the eval term pushes the decoder off its current predictions on that batch.
The authors expect ID and OOD batches to respond differently to this joint update.
On ID data the two gradients should work against each other, so the anchor loss stays high. On OOD data they should be nearly orthogonal, so the anchor loss drops. The post-finetune anchor loss λ is then the test statistic. The motivation is that lower loss on the batch would mean its samples sit in a different part of the PFN's internal class-conditioned representation than the anchor's.
Detectron and D3M perturb a separate converged classifier, which is impractical for a PFN. CALD instead perturbs the decoder and reads its signal from the anchor loss.
Calibration and the deployment test
Calibration draws a small labeled anchor set and a held-out ID eval set from ID validation data, and repeats this over many draws. Each draw runs the decoder finetune and records λ, which builds the ID distribution of anchor losses.
At deployment the same finetune runs, with the unlabeled batch replacing the eval set. The batch is flagged when its λ lands in the lower tail of the calibration values. The threshold is the empirical 0.05 quantile of the calibration losses, which sets the TPR@5% FPR operating point. The test is one-sided, and its error control relies on ID exchangeability.
Harmful and benign shifts across 14 datasets
The benchmark covers 14 datasets, seven with raw tabular shift and seven with structured shift on foundation-model features. On the harmful shifts, the better CALD variant reaches TPR of at least 0.99 on CivilComments, Camelyon, Waterbirds, CIFAR, PACS and Covertype. Across the 14 datasets, CALD matches or outperforms the 15 post-hoc baselines on harmful shifts.
For benign shifts the table scores correct silence, so a high number means few false alarms. The better variant keeps silence at 0.92 or higher on four of seven benign datasets: Adult, Amazon, Folktables under TabPFN and CelebA under TabICL. Bank stays at 0.02 or below, Diabetes Readmission at 0.08 or below, and Folktables under TabICL at 0.42.
The authors tie these weak cells to small accuracy gaps of at most 4.4%, close to the Hoeffding floor.
TabICL beats TabPFN on four subgroup-defined shifts: Camelyon from 0.19 to 1.00, Waterbirds from 0.46 to 0.99, CelebA from 0.27 to 0.97 and Credit Default from 0.00 to 0.76. Folktables is the one cell where TabPFN wins, with 0.98 compared to 0.42 for TabICL. This explanation remains a hypothesis that the authors did not isolate.
The baselines show the trade-off clearly: D-MMD, H-divergence and KNN each score at least 0.95 on a majority of harmful columns but at most 0.10 on a majority of benign columns. In the authors' reading, their harmful-side TPR comes from alarming almost always rather than from calibrated harm detection. RMD goes the other way, keeping benign silence close to CALD but falling to 0.40 to 0.67 on the moderate shifts Camelyon, Waterbirds and CIFAR.
Across all shifts, the authors claim CALD is the only detector that does well on both sides for a majority of datasets, and they stress that this is a relative claim.
Whether the signal follows harm
They use a controlled 2D Gaussian where rotating the class boundary is harmful and translating inputs along it is benign, with both matched in feature-space magnitude.
On the synthetic benign axis, a 0.7σ translation stays near chance, while 2.1σ and 7.1σ translations fire. The authors stress that this is an empirical pattern, not a theorem.
Checking the gradient cross-term
The analysis treats each finetune step as a first-order change in the anchor loss, with a cross-term correcting the usual descent rate. Equation (9) writes this as \( \Delta L_{\text{anc}}^{(t)} \approx -\eta\lVert g_a^{(t)}\rVert^2 - \eta\langle g_a^{(t)}, g_e^{(t)}\rangle \). Here g_a is the gradient of the anchor loss, g_e is the gradient of the eval disagreement loss, and η is the step size.
On ID eval the cross-term is strongly negative, which holds λ up, while on OOD eval it is near zero and λ falls.
The authors record the cosine between the two gradients and the anchor-loss change at every finetune step. They compute a per-dataset Spearman correlation separately for ID and OOD eval, and Equation (9) predicts a negative value. Covertype and Diabetes Readmission are the two ID exceptions, where the cosine sits at its fighting extreme with no spread.
The premise that the trajectory gap is positive holds on nine of ten datasets. CIFAR-10 and UCI Heart are the two where it is weakest or negative, and they are also the two with near-zero λ-gap.
Limits on benign shifts and scope
Benign shifts that still move substantial mass off the mistake region raise alarms on Bank, Diabetes, Credit, Folktables and CelebA, each under at least one PFN. Bank, Diabetes Readmission and Folktables under TabICL show the weakest silence, with rates of at most 0.02, at most 0.08 and 0.42 respectively.
The conformal test assumes ID exchangeability, so label shift, concept shift, open-set inputs and adversarial inputs are out of scope. The evaluation covers 14 datasets and two PFNs, TabPFN v2.5 and TabICL v2.
Paper info
- Authors
- Viet Nguyen, Herman Bergström, Stephan Rabanser, Rahul G. Krishnan
- Venue
- arXiv · Preprint
- First published
- 2026-11-25
- Added
- 2026-11-27
- Updated
- 2026-11-25
- Version
- v1
- arXiv
- 2611.34767
- Category
- cs.LG
- Original paper terms
- CC BY 4.0
- What we show
- Paper info, commentary and permitted figures from the original paper
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Abstract
Tabular prior-fitted networks (PFNs) work well across tabular classification problems but can fail silently at deployment when distributions shift. We propose CALD (Calibrated Anchor-Loss Disagreement), a lightweight unsupervised monitor that triggers an alarm to warn when a PFN might fail. By finetuning the decoder to maximize disagreement with the test-set prediction while maintaining accuracy on an ID anchor set, CALD identifies harmful OOD batches through the resulting anchor loss, requiring no labels on test batches. We prove that the post-finetune anchor loss has a strictly lower expectation under sufficiently severe shift than under ID eval, yielding a one-sided test. Across 14 datasets covering tabular and structured distribution shift, on both TabPFN and TabICL, CALD matches or outperforms baselines on harmful shifts and is markedly more resilient to benign-shift false alarms.
Quote from the paper
Viet Nguyen, Herman Bergström, Stephan Rabanser, Rahul G. Krishnan (2026). When to Trust a PFN: Detecting Harmful Shift in Tabular Foundation Models. arXiv:2611.34767v1. https://arxiv.org/abs/2611.34767v1
BibTeX
@misc{nguyen2026when,
title = {{When to Trust a PFN: Detecting Harmful Shift in Tabular Foundation Models}},
author = {Viet Nguyen and Herman Bergström and Stephan Rabanser and Rahul G. Krishnan},
year = {2026},
eprint = {2611.34767},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2611.34767v1}
}