arXiv:2611.01489cs.IRNov 2026

Manuscript Offprint

arXiv:2611.01489

CCD: Context-Calibrated Open-Entity Out-of-Distribution Detection in In-Context Tabular Foundation Models

Zhangkai Wu, Xu Zhang, Zhihao Hao, Zhihong Cui, Yongmin Yoo, Xianxun Zhu, Kaize Shi

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Zhangkai Wu

The University of Sydney

zhangkai.wu@sydney.edu.au

Xu Zhang

Macquarie University

xu.zhang12@hdr.mq.edu.au

Zhihao Hao

Beijing Technology and Business University

hao.zhihao@connect.um.edu.mo

Zhihong Cui

University of Oslo

zhihongc@ifi.uio.no

Yongmin Yoo

Macquarie University

yongmin.yoo@mq.edu.au

Xianxun Zhu

Macquarie University

xianxun.zhu@mq.edu.au

Kaize Shi

University of Southern Queensland

Kaize.Shi@unisq.edu.au

Abstract

In-context tabular foundation models (TFMs), such as TabPFN, predict from a labelled context without updating their parameters and are increasingly used for out-of-distribution (OOD) detection in Web applications, whose test rows come from entities absent from that context. Such applications need open-entity OOD detection: a new entity must not be mistaken for an unknown class, and an unknown class must still be caught. Existing detectors fail in this setting, and an entity-split gap hides the failure: random splits also place the test entities in the context. The failure arises because every TFM score reflects how unfamiliar a row is to the context. This produces an entity-over-class bias: known-class rows of new entities look more OOD than familiar ones, sometimes more than unknown classes. Specifically, the two OOD scores most widely used with in-context TFMs face an entity-class trade-off: the TFM's predictive confidence misses unknown classes, whereas the distance of a test row to the context flags new entities. To address this problem, we hold a group of entities out of the context and score them with the remaining context, which turns them into new entities of known classes and tells us how such rows should score. To measure detection on new entities, we build NEO-Tab (New-Entity OOD detection on Tables), 14 grouped and temporal tables on which all test rows come from new entities. We then propose Context-Calibrated Detection (CCD), which uses these group-out swaps on in-distribution data to calibrate three distances and the confidence against new-entity references. CCD weights them by their sensitivity and sharpness, keeps the model frozen and uses no OOD data. On NEO-Tab, CCD outperforms 16 existing detectors on every metric we report, and its lead holds on three TFM backbones.

Preprint.

Figure

Figure 1: Open-entity OOD detection in a marketplace, with sellers as entities and product categories as classes. A high score of a TFM-based detector indicates OOD. In classic OOD detection (faded row), it can only signal an unknown class because the entity is in the context. In open-entity OOD detection (highlighted row), known-class (ID) and unknown-class (OOD) listings both receive a high score because test rows come from new entities. The detector must separate them, yet existing detectors raise a false alarm on the ID listing.

Figure

Figure 2: Why open-entity OOD detection is hard for in-context TFMs. Symbols as in Fig. 1. (a) Entity-split gap: entity splits cost all eight detectors 5.2–15.8 AUROC points relative to random splits. (b) Entity-over-class bias: on gesture phase, new-entity ID rows look more OOD than unknown-class rows under confidence. TabPFN v2 confidence there is 0.51 on new-entity rows, below the 0.76 on unknown-class rows and the 0.98 on familiar rows. (c) Entity-class trade-off: feature distance detects the unknown class (AUROC 86.7 against 17.7 for confidence) but also flags new entities.

1 Introduction

Out-of-distribution (OOD) detection [41] with in-context tabular foundation models (TFMs), which predict from a labelled context without updating their parameters [16, 23, 24], is increasingly deployed in Web services. These services predict for entities, such as merchants in fraud detection [31] or users on recommendation platforms [29, 37], so their test rows come from entities absent from the context. The detector must therefore reject rows of unknown classes while accepting the known-class rows of new entities, a problem we call open-entity OOD detection. Fig. 1 illustrates it on a marketplace that classifies listings, where a listing from a new seller in a known product category must be accepted, whereas a listing in a category absent from the context must be rejected.

Open-entity OOD detection first faces an entity-split gap, illustrated in Fig. 2a, because random splits conceal how existing detectors fail on new entities. Tabular OOD detection draws on two kinds of evidence, confidence and distance, each resting on a premise that a new entity breaks. Confidence-based scores such as the maximum softmax probability (MSP) [14] and its variants [13, 20] assume that in-distribution (ID) rows are predicted confidently. Distance-based scores such as the Mahalanobis distance [17] and k-nearest neighbours (kNN) [33] assume that ID rows lie near the training data. Both premises fail on a known-class row of a new entity, because it is neither predicted confidently nor close to the context. Random splits [3] hide this failure because they place the entities of the ID test rows in the context as well, where both premises hold. As a result, replacing only the ID test rows of familiar entities with those of new entities lowers the area under the ROC curve (AUROC) of all eight detectors by 5–16 points on six tasks and changes their ranking.

Open-entity OOD detection also shows an entity-over-class bias: confidence-based and distance-based detectors rank known-class rows of new entities as more OOD than those of familiar entities. With one fixed context, this ranking holds for 13 of the 14 detectors. Fig. 2b shows a case in which these rows look more OOD than even unknown-class rows. On gesture phase, TabPFN with the same context has a median confidence of 0.98 on known-class rows of familiar entities. On known-class rows of new entities it drops to 0.51, below even the 0.76 it gives the unknown class. A likely cause lies in in-context prediction, because every score of an in-context TFM is determined by the context. In a simple model of in-context prediction, the confidence measures how close a test row is to the context and reverts to the prior far from it whatever the class, as Prop. 2 states. Distance-based scores likewise measure unfamiliarity to the context by construction. To an in-context TFM, a new entity and an unknown class can therefore look equally unfamiliar. Yet a known-class row of a new entity should be accepted because the entity changes without changing the class, a covariate shift. An unknown-class row should be rejected because its class is absent from the context, a semantic shift.

The two kinds of evidence also fail in different places, which creates an entity-class trade-off: distances react to both kinds of novelty and see the unknown class that confidence misses but are themselves sensitive to new entities, as Fig. 2c shows. Confidence fails because a label-oriented output need not retain the features in which an unknown class differs. With TabPFN, MSP stays below 24 AUROC on four tables, while a feature-space kNN reaches 84–87 on three of them. Distances fail because they carry no class information and therefore flag a new entity far from the context as an outlier. These complementary failures motivate combining the two kinds of evidence after calibrating each against a reference for how known-class rows of new entities score.

The property that makes new entities look unfamiliar also lets us create new entities from the context, and our solution builds on it. To an in-context TFM, a new entity is simply an entity absent from the context, and which entities are absent is under our control. Holding a group of entities out of the context and scoring them with the remaining context turns them into new entities of known classes, and under exchangeability their scores are samples from the new-entity distribution, as Prop. 1 states. Against the entity-split gap, we build NEO-Tab (New-Entity OOD detection on Tables), 14 grouped and temporal tables that include the six qualifying BeyondArena tasks [25]. On NEO-Tab, ID and OOD test rows both come only from new entities. Against the entity-over-class bias and the entity-class trade-off, we propose Context-Calibrated Detection (CCD), whose group-out context swaps give, from ID data alone, the reference distribution of every score on new entities and its sensitivity to them. The same swaps give the fraction of held-out rows on which the confidence stays sharp. CCD corrects the entity-over-class bias by calibrating the confidence and three distances against their reference distributions, with one distance in a label subspace. CCD addresses the entity-class trade-off by weighting each distance by its sensitivity and the confidence by its sharpness before summing them into one score, as Fig. 3 shows.

CCD is the strongest of the 17 detectors on NEO-Tab on all three metrics, gains 7.4 AUROC points over a kNN tuned to be least sensitive to new entities (p=0.0012p = 0.0012), and keeps this lead on three backbones. The three testable predictions of the theory hold on the development trials.

We summarise our contributions as follows.

  • We give the first formulation of open-entity OOD detection for in-context tabular models and trace its entity-split gap, entity-over-class bias and entity-class trade-off to in-context prediction.

  • We build NEO-Tab, 14 grouped and temporal tables on which all ID and OOD test rows come from unseen entities, and release its splits and scripts.

  • We propose CCD, whose group-out swaps give a new-entity reference from ID data alone, against which four scores are calibrated and weighted before fusion.

  • We find CCD to be the strongest of 17 detectors on 14 tables, 7.4 AUROC points above a kNN tuned to be least sensitive to new entities, with a lead that holds on three TFM backbones. The three testable predictions of our theory hold on the development trials.