Bayesian Quantification with Black-Box Estimators
Albert Ziegler, Paweł Czyż
TL;DR
This paper addresses quantifying class prevalence in an unlabeled dataset under prior probability shift by casting the problem as Bayesian inference. It introduces a tractable Bayesian model that replaces a high-dimensional $P(X|Y)$ with a low-dimensional surrogate $P(C|Y)$ via a mapping $f$, and derives a discrete model with parameters $(oldsymbol{3pi}, oldsymbol{3pi'}, oldsymbol{3phi})$ that admit efficient inference through sufficient statistics and Hamiltonian Monte Carlo. The authors prove asymptotic consistency of the MAP estimator under weak conditions and demonstrate through extensive experiments that the Bayesian approach matches or exceeds the performance of established methods (BBSE, IR, CC) while providing principled uncertainty quantification, especially when the number of classes differs between labeled and unlabeled data. The method is practical for calibration tasks and decision-making under uncertainty, with applications in healthcare and biomedical data, and it highlights the value of uncertainty-aware, prior-informed quantification in real-world shift scenarios.
Abstract
Understanding how different classes are distributed in an unlabeled data set is an important challenge for the calibration of probabilistic classifiers and uncertainty quantification. Approaches like adjusted classify and count, black-box shift estimators, and invariant ratio estimators use an auxiliary (and potentially biased) black-box classifier trained on a different (shifted) data set to estimate the class distribution and yield asymptotic guarantees under weak assumptions. We demonstrate that all these algorithms are closely related to the inference in a particular Bayesian model, approximating the assumed ground-truth generative process. Then, we discuss an efficient Markov Chain Monte Carlo sampling scheme for the introduced model and show an asymptotic consistency guarantee in the large-data limit. We compare the introduced model against the established point estimators in a variety of scenarios, and show it is competitive, and in some cases superior, with the state of the art.
