Detecting and Correcting for Label Shift with Black Box Predictors
About
Faced with distribution shift between training and test set, we wish to detect and quantify the shift, and to correct our classifiers without test set labels. Motivated by medical diagnosis, where diseases (targets) cause symptoms (observations), we focus on label shift, where the label marginal $p(y)$ changes but the conditional $p(x| y)$ does not. We propose Black Box Shift Estimation (BBSE) to estimate the test distribution $p(y)$. BBSE exploits arbitrary black box predictors to reduce dimensionality prior to shift correction. While better predictors give tighter estimates, BBSE works even when predictors are biased, inaccurate, or uncalibrated, so long as their confusion matrices are invertible. We prove BBSE's consistency, bound its error, and introduce a statistical test that uses BBSE to detect shift. We also leverage BBSE to correct classifiers. Experiments demonstrate accurate estimates and improved prediction, even on high-dimensional datasets of natural images.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Image Classification | PACS | -- | 230 | |
| Image Classification | Digits-Five | Accuracy (Source: mt)94.47 | 44 | |
| Image Classification (Feature shift) | CIFAR-10-C (target clients) | Accuracy67.96 | 22 | |
| Unsupervised Domain Adaptation | Office-Home RS-UT label shifts | Accuracy (Rw -> Pr)61.1 | 16 | |
| Fairness measurement estimation | GenData-StyleGAN2 1.0 (BlackHair) | Epsilon P3.27 | 15 | |
| Domain Adaptation | OfficeHome RS->UT | Accuracy (Rw -> Pr)61.1 | 14 | |
| Unsupervised Domain Adaptation | DomainNet 1.0 (test) | R->C Accuracy0.5538 | 12 | |
| Image Classification (Label shift) | CIFAR-10-C (target clients) | Accuracy79.3 | 11 | |
| Classification | Yeast4 QP shift (test) | F1 Score0.56 | 9 | |
| Classification | Yeast 4QP shift (test) | F1 Score42 | 9 |