JUCAL: Jointly Calibrating Aleatoric and Epistemic Uncertainty in Classification Tasks
Jakob Heiss, Sören Lambrecht, Jakob Weissteiner, Hanna Wutte, Žan Žurič, Josef Teichmann, Bin Yu
TL;DR
JUCAL addresses the misbalance between aleatoric and epistemic uncertainty in ensemble classifications by jointly calibrating both via two tunable constants, optimized using negative log-likelihood on a calibration set. It extends temperature scaling with a diversity-adjustment parameter to modulate ensemble disagreement, enabling input-conditioned uncertainty that better reflects data noise and model uncertainty. Empirical results across text and image domains show consistent improvements over pool-then-calibrate and uncalibrated baselines, with up to 15% NLL reduction and substantial reductions in predictive-set size, while enabling smaller ensembles to outperform larger calibrated ones and cutting inference costs. The method is simple, model-agnostic, and easily integrable into existing pipelines, offering practical gains in reliability and efficiency for real-world classification tasks.
Abstract
We study post-calibration uncertainty for trained ensembles of classifiers. Specifically, we consider both aleatoric (label noise) and epistemic (model) uncertainty. Among the most popular and widely used calibration methods in classification are temperature scaling (i.e., pool-then-calibrate) and conformal methods. However, the main shortcoming of these calibration methods is that they do not balance the proportion of aleatoric and epistemic uncertainty. Not balancing these uncertainties can severely misrepresent predictive uncertainty, leading to overconfident predictions in some input regions while being underconfident in others. To address this shortcoming, we present a simple but powerful calibration algorithm Joint Uncertainty Calibration (JUCAL) that jointly calibrates aleatoric and epistemic uncertainty. JUCAL jointly calibrates two constants to weight and scale epistemic and aleatoric uncertainties by optimizing the negative log-likelihood (NLL) on the validation/calibration dataset. JUCAL can be applied to any trained ensemble of classifiers (e.g., transformers, CNNs, or tree-based methods), with minimal computational overhead, without requiring access to the models' internal parameters. We experimentally evaluate JUCAL on various text classification tasks, for ensembles of varying sizes and with different ensembling strategies. Our experiments show that JUCAL significantly outperforms SOTA calibration methods across all considered classification tasks, reducing NLL and predictive set size by up to 15% and 20%, respectively. Interestingly, even applying JUCAL to an ensemble of size 5 can outperform temperature-scaled ensembles of size up to 50 in terms of NLL and predictive set size, resulting in up to 10 times smaller inference costs. Thus, we propose JUCAL as a new go-to method for calibrating ensembles in classification.
