Calibration “resolves” epistemic uncertainty by giving predictions that are indistinguishable from the true probabilities. Why is this still unsatisfying?

This is Jessica. The last day of the year is like a good time for finishing things up, so I figured it’s time for one last post wrapping up some thoughts on calibration. 

As my previous posts got into, calibrated prediction uncertainty is the goal of various posthoc calibration algorithms discussed in machine learning research, which use held out data to learn transformations on model predicted probabilities in order to achieve calibration on the held out data. I’ve reflected a bit on what calibration can and can’t give us in terms of assurances for decision-making. Namely, it makes predictions trustworthy for decisions in the restricted sense that a decision-maker who will choose their action purely based on the prediction can’t do better than treating the calibrated predictions as the true probabilities. 

But something I’ve had trouble articulating as clearly as I’d like involves what’s missing (and why) when it comes to what calibration gives us versus a more complete representation of the limits of our knowledge in making some predictions. 

The distinction involves how we express higher order uncertainty. Let’s say we are doing multiclass classification, and fit a model fhat to some labeled data. Our “level 0” prediction fhat(x) contains no uncertainty representation at all; we check it against the ground truth y. Our “level 1” prediction phat(.|x) predicts the conditional distribution over classes; we check it against the empirical distribution that gives a probability p(y|x) for each possible y. Our “level 2” prediction is trying to predict the distribution of the conditional distribution over classes, p(p(.|x), e.g. a Dirichlet distribution that assigns probability to each distribution p(.|x), which we can distinguish using some parameters theta.

From a Bayesian modeling perspective, it’s natural to think about distributions of distributions. A prior distribution over model parameters implies a distribution over possible data-generating distributions. Upon fitting a model, the posterior predictive distribution summarizes both “aleatoric” uncertainty due to inherent randomness in the generating process and “epistemic” uncertainty stemming from our lack of knowledge of the true parameter values. 

In some sense calibration “resolves” epistemic uncertainty by providing point predictions that are indistinguishable from the true probabilities. But if you’re hoping to get a faithful summary of the current state of knowledge, it can seem like something is still missing. In the Bayesian framework, we can collapse our posterior prediction of the outcome y for any particular input x to a point estimate, but we don’t have to. 

Part of the difficulty is that whenever we evaluate performance as loss over some data-generating distribution, having more than a point estimate is not necessary. This is true even without considering second order uncertainty. If we train a level 0 prediction of the outcome y using the standard loss minimization framework with 0/1 loss, then it will learn to predict the mode. And so to the extent that it’s hard to argue one’s way out of loss minimization as a standard for evaluating decisions, it’s hard to motivate faithful expression of epistemic uncertainty.

For second order uncertainty, the added complication is there is no ground truth. We might believe there is some intrinsic value in being able to model uncertainty about the best predictor, but how do we formalize this given that there’s no ground truth against which to check our second order predictions? We can’t learn by drawing samples from the distribution that assigns probability to different first order distributions p(.|x) because technically there is no such distribution beyond our conception of it. 

Daniel Lakeland previously provided an example I found helpful of the difference between putting Bayesian probability on a predicted frequency, where there’s no sense in which we can check the calibration of the second order prediction. 

Related to this, I recently came across a few papers by Viktor Bengs et al that formalize some of this in an ML context. Essentially, they show that there is no well-defined loss function that can be used in the typical ML learning pipeline to incentivize the learner to make correct predictions that are also faithful as expressions of the epistemic uncertainty. This can be expressed in terms of trying to find a proper scoring rule. In the case of first order predictions, as long as we use a proper scoring rule as the loss function, we can expect accurate predictions, because a proper scoring rule is one for which one cannot score higher by deviating from reporting our true beliefs. But there is no loss function that incentivizes a second-order learner to faithfully represent its epistemic uncertainty like a proper scoring rule does for a first order learner. 

This may seem obvious, especially if you’re coming from a Bayesian tradition, considering that there is no ground truth against which to score second order predictions. And yet, various loss functions have been proposed for estimating level 2 predictors in the ML literature, such as minimizing the empirical loss of the level 1 prediction averaged over possible parameter values. These results make clear that one needs to be careful interpreting the predictors they give, because, e.g., they can actually incentivize predictors that appear to be certain about the first order distribution. 

I guess a question that remains is how to talk about incentives for second order uncertainty at all in a context where minimizing loss from predictions is the primary goal. I don’t think the right conclusion is that it doesn’t matter since we can’t integrate it into a loss minimization framework. Having the ability to decompose predictions by different sources of uncertainty and be explicit about what our higher order uncertainty looks like going in (i.e., by defining a prior) has scientific value in less direct ways, like communicating beliefs and debugging when things go wrong. 

7 thoughts on “Calibration “resolves” epistemic uncertainty by giving predictions that are indistinguishable from the true probabilities. Why is this still unsatisfying?

  1. Hi Jessica, here’s an idea from left field. Maybe this is a case of Chaitin’s “if one has ten pounds of axioms and a twenty-pound theorem, then that theorem cannot be derived from these axioms.” Here, the axioms comprise the philosophy of knowledge–how do we get from observations to “truth”? Your example starts with “ground truth,” but that glosses over all the interesting parts of how such truth might be constructed, and hence the statistics that result from it.

    I’m working on a similar project, with binary classifications. I assume that true classes are latent (never directly observable), and that knowledge is from justified true belief (JTB), which can go off the rails randomly due to justifications that don’t quite work (like Gettier problems). So there are three probabilities to model a data set: t = fraction of true class 1 cases, a = rater accuracy (chance to avoid a Gettier-like problem with JTB), and p = random assignment of Class 1 when rating inaccurately. From there, we can derive common approaches to binary classification in behavioral science and ML, but now with a clear epistemological description. For example, that description I just gave doesn’t account for adversarial raters who intentionally assign the wrong class. But we could modify the model to include that. Or we could have more parameters to separate TPR from FPR, etc.

    My work in progress is at https://kappazoo.com. There’s an R package and a shiny app to try it out, linked on the site. I’m currently working on the hierarchical models.

  2. Hi Jessica, I’m new to some of these concepts, so I have a couple basic questions I wanted to ask to get a better understanding.

    1. Is a Level 0 prediction just the base rate of each class?
    2. I’m having some trouble conceptualizing what the level 2 prediction looks like in practice. Does each class have its own distribution around the predicted probability? Does this information fall out naturally from a bayesian model?
    3. “Having the ability to decompose predictions by different sources of uncertainty…” Would this be like saying “x% of the uncertainty is aleatoric, y% is epistemic? If so, how would one go about doing that?

    I enjoyed this writeup a lot, thank you for the time!

    • 1. In the context of multiclass classification, where for any set of specific feature values x you want to predict the label y from some set of categorical labels, level 0 just means whatever label your model predicts. However, your level 1 predictions, which assign a probability to each possible label conditional on x, might return the base rate depending how you set up the model. See the table on the top of page 3 here: https://arxiv.org/pdf/2203.06102

      2. Level 2 for multiclass classification would mean that rather than just getting a point estimate of the probability of each possible label y conditional on some feature values x, you would get a distribution for each possible label. Yes, this naturally falls out of a Bayesian model. You specify a prior distribution over different possible parameter values, then combine it with a likelihood function to find the posterior distribution over parameter values. You then propagate this uncertainty about parameter values through to predictions you want to make about specific data points (represented by specific feature values x) – this is the posterior predictive distribution.

      3. Yes, I’m not an expert on this line of work, but there are some recent ML papers that talk about decomposing it, like this one https://proceedings.mlr.press/v80/depeweg18a/depeweg18a.pdf

      Glad it was helpful!

  3. I’ve had a problem like this arise in risk assessment. If you have a stochastic simulator of the event for which you’re trying to obtain the exceedance probability, you probably want a calibrated probability distribution at the other end (it seems non-trivial here to target the probability directly). On the other hand you also want to somehow report some model uncertainty so you’re stuck. I think this becomes particularly tricky when you move to things like using emulators i.e. GPs where you’re trading off runtime for epistemic uncertainty in some way. Then your aleatoric and epistemic uncertainties become comingled in a way that makes calibration tricky. I’ve seen papers like this https://www.cambridge.org/core/journals/philosophy-of-science/article/confidence-in-probabilistic-risk-assessment/E7F3CBDE94325C92D5DBFE30A5FAD235 encourage quantitative assessments of model uncertainty which i currently lean towards but perhaps we just need explicit methods to disentangle the different levels as you’ve outlined above?

  4. Hi Jessica! I think our recent paper (https://arxiv.org/abs/2412.18808, to appear at ICLR) addresses some of the questions you raise here. Basically, while it’s true that p(.|x) is often difficult to access, there are many natural scenarios where it can reliably be estimated—during model distillation, for example, or problems where you can crowdsource labels from multiple independent labelers. We define a new notion of *higher-order* calibration to capture what it means for a second-order predictor to be calibrated in such settings, and show that it’s a sufficient and necessary condition for good uncertainty decomposition. We’d be interested to hear what you think!

Leave a Reply

Your email address will not be published. Required fields are marked *