Open Set Label Shift with Test Time Out-of-Distribution Reference
Changkun Ye, Russell Tsuchida, Lars Petersson, Nick Barnes
TL;DR
This work tackles Open Set Label Shift (OSLS), where the target domain contains an OOD class and the ID data distribution shifts from the source while the conditional data model $p(x|y)$ is preserved. It introduces a three-stage, test-time OSLS-EM framework that uses a source ID classifier and an ID/OOD detector, plus a test-time OOD reference dataset, to estimate the target ID distribution ${p_t(y)=\boldsymbol{\pi}}$ and target ID data ratio ${p_t(b=1)=\rho_t}$, and to correct the source classifier without retraining. The estimation relies on a convex, reparameterized maximum likelihood objective and EM iterations (MLE/MAP variants), with a corrective step to handle imperfect OOD detectors via a linear rho-t correction; an explicit source data-ratio estimator ${\hat{\rho}}_s$ is provided with concentration bounds. An OOD reference can be pseudo-generated at test time, enabling flexible deployment across datasets like CIFAR-10/100 and ImageNet-200; experiments demonstrate improvements over CSLS baselines in both estimation error and correction accuracy, validating practical OSLS deployment. The approach thus enables robust domain adaptation under open-set shifts without retraining, broadening applicability in real-world deployment where labeled target data and OOD samples are scarce.
Abstract
Open set label shift (OSLS) occurs when label distributions change from a source to a target distribution, and the target distribution has an additional out-of-distribution (OOD) class. In this work, we build estimators for both source and target open set label distributions using a source domain in-distribution (ID) classifier and an ID/OOD classifier. With reasonable assumptions on the ID/OOD classifier, the estimators are assembled into a sequence of three stages: 1) an estimate of the source label distribution of the OOD class, 2) an EM algorithm for Maximum Likelihood estimates (MLE) of the target label distribution, and 3) an estimate of the target label distribution of OOD class under relaxed assumptions on the OOD classifier. The sampling errors of estimates in 1) and 3) are quantified with a concentration inequality. The estimation result allows us to correct the ID classifier trained on the source distribution to the target distribution without retraining. Experiments on a variety of open set label shift settings demonstrate the effectiveness of our model. Our code is available at https://github.com/ChangkunYe/OpenSetLabelShift.
