This is Jessica. Calibration has been a topic of recent work in theoretical computer science, such as on multicalibration—calibration of model predictions in light of additional contextual information, such as groups represented in the data —and posthoc calibration of predictions from a blackbox model. Calibration is typically understood as the property of a prediction model or algorithm where for all predictions that are approximately b, the event realizes at a rate of b, and this is true for all values of b (where b is binned to some extent). It can be defined over a distribution or over a sequence. The online (sequential) setting is more challenging, because we can imagine Nature picking outcomes adversarially to throw us off. If the model/algorithm is calibrated in the sequential setting, then expected calibration error–the weighted average error of the predictions–goes to zero as the number of periods increases.
Some of this recent work explores the value of calibration to decision-making. Calibrated predictions are said to be valuable because payoff-maximizing decision makers can trust them. For example, Noarov and Roth argue in this blog post that simultaneously for all downstream problems, the policy that treats the predictions of a calibrated model as correct and acts accordingly is uniformly best. Elsewhere similar points are made. Sometimes this is stated in terms of no swap regret: any decision maker (regardless of their utility function) who best responds to a sequence of calibrated predictions cannot improve their total payoff in retrospect by changing every occurrence of some action i to a different action j. These points assume that the decision-maker uses only the predicted probability to select the action that minimizes their expected loss; i.e., no additional information about the true state is provided.
Given that it is defined based on what realizes over the long term, it seems obvious that calibration alone can’t ensure that we make good decisions over a shorter time horizon. For example, while no deterministic sequence of predictions can be calibrated for all possible realizations of the sequence, a randomized algorithm can produce forecasts that are approximately calibrated regardless of what realizes. But as the well-known Foster and Vohra paper shows, we don’t necessarily need to have knowledge of the true data-generating process to achieve this. If all my decisions carry similar (low) stakes I might not care that I’m losing utility in the short term, but if some decisions are much more important than others, I might want to know more about the forecast I’m getting than just that it’s calibrated. So how we achieve calibration seems hard to ignore as soon as we think about decision-making in finite time. Theory papers tend to talk about how regret or error scale with the number of periods, but not so much about what kind of information we get from any single prediction.
This “how” question has me wondering about the connection between certain algorithms for achieving calibration and Bayesian learning. On the one hand, it seems very unsatisfying from a Bayesian perspective to say that calibration is sufficient for good decisions, because of the pre-occupation with long range frequencies. On the other hand, arguments that calibration is valuable for decision-making adopt a Bayesian perspective by assuming that the decision-maker will choose the action that minimizes expected loss over a posterior distribution. Wald shows that with a discrete space of possible states of the world, when we refrain from considering states of nature that are known to be impossible, we find that the only admissible decision strategies—those for which we can conclude there is no other strategy with lower expected loss over the distribution of states—are Bayesian ones.
I’m familiar with Dawid’s 1982 summary of the Bayesian perspective on calibration. In this view, calibration is expected given coherence, i.e., that the forecaster’s conditional probability estimates abide by the rules of probability theory. In theory, calibration is not even useful for diagnosing model misfit. However, Dawid himself problematizes this by pointing out that in practice, expecting calibration every time one uses a Bayesian model is unrealistic. Andrew has talked about how applied Bayesian analysis does often involve checking calibration, which matches my experience. Bob describes how the theory offers only “cold comfort” given that we don’t usually expect to have gotten the model right. So calibration is not so important in Bayesian learning theory, but in practice can be an important signal of how to improve the model to some Bayesians.
I am specifically interested in the decision-making perspective though. From the perspective of Wald’s approach, inference is just a special case of decision-making. Jaynes argues that even if you don’t buy Wald’s formulation of the admissibility requirement for decision strategies (because it doesn’t account for prior information), there are other inevitabilities of the Bayesian approach in estimation that even a sampling theorist must admit. If we care about making the best decision under uncertainty about the state, we need to make our best (i.e., conditional on all the available evidence) prediction of the probability of the state.
I’m used to thinking of calibration as sort of a minimal quality we expect of good predictions, not a property sufficient for good decisions. But now I’m wondering what, if anything, we can say about our use of information in arriving at a prediction when we know that our predictions are calibrated in the sense described above? Bayesian theory implies calibration but does calibration imply anything in the other direction? Can we say something about the degree to which forecasts from online algorithms are aggregating information like a Bayesian? I’ve seen some of the online algorithms described as non-Bayesian, but this isn’t really satisfying.
Comments, critiques, pointers to related discussions all welcome.
Something I don’t say in this post but which relates to calibration being unsatisfying from a Bayesian perspective is that calibration doesn’t say anything about how well we communicate uncertainty for a specific decision. Knowing a forecast is calibrated doesn’t give me information about how uncertain the forecaster is about any specific forecast they are giving me. For that I need to know more about how the forecasts are constructed / how they change with more information.
The current standard of macroeconomic modeling is DSGE modeling, in which equations representing economic concepts (consumer behavior, production behavior, financial intermediary behavior) are specified as a system of equations and solved by calibration. (I am not a macroeconomicst, so if I am too glib here, somebody correct me)
Most of the attack is on the idealism and the chosen friction of the systems of equations, but when I first learned about these it was the solution by calibration that I found the most offputting. To quote Olivier Blanchard (who is a good macroeconomist): https://www.sipotra.it/wp-content/uploads/2017/05/DSGE-Models-in-the-Conduct-of-Policy-Use-as-intended.pdf#page=95
“The models are estimated as a system, rather than equation by equation as in previous
macroeconometric models. They come, however, with a very large number of parameters
to estimate, so that classical estimation of the full set is unfeasible. Thus, a number of
parameters are set a priori, through “calibration”. This approach would be reasonable if
these parameters were well established empirically or theoretically. For example, under
the assumption that the production function is Cobb-Douglas, using the share of labour
as the exponent on labour in the production function may be reasonable. But the list of
parameters chosen through calibration is typically much larger, and the evidence often
much fuzzier. For example, in the face of substantial differences in the behaviour of
inflation across countries, use of the same “standard Calvo parameters” (the parameters
determining the effect of unemployment on inflation) in different countries is highly
suspicious. In many cases, the choice to rely on a “standard set of parameters” is simply
a way of shifting blame for the choice of parameters to previous researchers.
The remaining parameters are estimated through Bayesian estimation of the full model.
The problems are twofold. One is standard in any system estimation. Misspecification
of part of the model affects estimation of the parameters in other parts of the model.
For example, misspecification of aggregate demand may lead to incorrect estimates of
price and wage adjustment, and so on. And it does so in ways that are opaque to the
reader. The other problem comes from the complexity of mapping from parameters
to data. Classical estimation is de facto unfeasible, the likelihood function being
too flat among many dimensions. Bayesian estimation would certainly seem to
be the way to proceed, if indeed we had justifiably tight priors for the coefficient
In many cases, however, the justification for the tight prior is weak at best, and what is
estimated reflects more the prior of the researcher than the likelihood function.”
In Jessica’s context the calibration being mentioned is that the Bayesian probabilities of observables represent frequencies of future observations. So it’s not the same term. What you’re talking about could be described as infinitely concentrated priors on certain parameters in a Bayesian fit. (So that the fit uses only one value of that parameter.)
Jessica
As I said in another thread a few days back, if you want to estimate frequency distributions you should estimate them like any other model, by parameterizing them and estimating Bayesian uncertainty in the parameters.
Suppose for example we have some repeatable process which results in something being filled up some fraction full. So the measured outcome is between 0,1
Suppose that there’s some sensitivity to measurement that can be defined in terms of granularity of say 0.05 so that we can define 20 bins in the region [0,1]
Now we can define the frequency histogram over the region [0,1] in terms of a Dirichlet distribution over the heights of the histogram bars. The Dirichlet distribution has 20 parameters describing “effective counts”. (Or, one 20 dimensional vector).
We can define a prior over the distribution, and observe some count data, and get a posterior over the distribution. Then we can draw samples from the posterior and these samples will each be a normalized histogram saying what fraction of the samples fall in each bin.
Now, calibration is assessed by how much information you have about what the frequency distribution is, in terms of how different are the various histogram samples.
This cleanly separates two entirely different concepts. 1) Bayesian probability about unobservables (ie. The true frequencies) and 2) Frequency distributions over observables (ie. The estimated frequencies in the individual draws of histograms from the Dirichlet posterior)
If you don’t explicitly model the frequencies, you can’t expect to get a model of frequencies.
Bayesian likelihoods are about how much you know about individual data points future positions. Nothing says they have to be derived from future frequencies.
Bayesian likelihoods over frequency distributions are about how much you know about future frequencies.
One super common applied situation where this comes up (literally all the time) is when people get hung up on whether regression residuals “look right”, i.e. doing things like “testing for Normality”, etc.
Yeah that’s a very common and completely wrongheaded situation.
But if you really want to predict frequencies of errors, you need to concern yourself with the shape of the residuals. Virtually nothing has actually normally distributed errors. And any situation in which you are fairly sure the errors are normally distributed is one so dense in data that you hardly need to do any modeling. For example if you have a trillion measurements of the voltage across a thermocouple, you can see any small slice of it (at a near constant voltage say) has extremely normal shape (around a temperature).. But then the last thing you need is a regression, just average the data near whatever voltage reading you have to find out the temperature.
Thanks for your comments, Daniel. I see what you’re saying about needing to model the frequencies to distinguish Bayesian probability around the parameters.
When you say “Bayesian likelihoods are about how much you know about individual data points future positions. Nothing says they have to be derived from future frequencies” are you just emphasizing that we might care more about summarizing our uncertainty under some model at any given point in time, over being calibrated with respect to the future? I’m still trying to understand to what extent predictions from a Bayesian model of the frequency distribution can be informative when the outcomes are chosen adversarially.
So in order for there to be some “future frequencies” we need some kind of stationarity in the future. This is different from exchangeability in knowledge across time. There’s a difference between “I know the future will be a draw from this fixed shape distribution” and “I know nothing that would help me distinguish my prediction about the future from my prediction about the past”
This is related to the differences Andrew talked about in boxer, wrestler, coin flip.
We know, because of physics, that coin flip data has binomial f= 0.5 for all time to within a small tolerance. But imagine we have say two chess masters playing each other. This may start out as similar to Binomial f=0.5 but through time one of these chess masters may detect a pattern in the others play and exploit it… So that maybe F becomes more like say 0.75 and then through time the other one may study a lot of games and realize what his opponent is doing and F drifts back towards 0.5, and then maybe becomes even shifted towards say 0.4…
We know nothing about what the trajectory of F will be in the future. So it could go either direction , it could spend more time or less time near f biased one way or another… It could oscillate or trend…
But some other pair of chess players maybe just trends slowly F getting bigger and bigger as one player dominates the other through time…
There is only a well defined frequency in infinite plays in the coin flip type situation, where the state of the world is truly symmetrical, for these other situations it’s more like the observed frequencies are not a well defined property of the universe, they are a contingent future trajectory.
A lot of science is more like contingent trajectories = dynamics, than it is random numbers which will necessarily spend a certain amount of their future in a certain region of parameter space which we could marginalize out into a frequency distribution that is a well defined fact about the world that is stable.
We can only model frequencies in the long run when that is at least approximately a necessarily fact about the future. The kind of thing you can only do when you observe stationarity or have a theoretical reason to imagine stationarity makes sense.
https://en.wikipedia.org/wiki/Calibration_(statistics)
Whats the difference between “calibration” and “predictive skill”?
I’m getting strong “wizard of oz” vibes from my bit of reading on it. Ie, that all this jargon is obscuring a hodgepodge of heuristics and rules of thumb.
Calibration is a concept you wind up with when people don’t understand what they’re doing exactly.
If you want to predict frequencies make your model a model of frequencies.
If you want to predict data points, make your model a model of data points values.
“Calibration” is the concept you get when people use a model of data points and then demand the probabilities derived from it act like frequencies.
If I have a model of velocity measurements that’s Normal(a,b) this means I think the velocity will be close to a within about b.
If I want to model frequencies I should create a frequency model. That is, the **shape** of the distribution should depend on how many observations I’ve seen in the vicinity of a point.
>Calibration is a concept you wind up with when people don’t understand what they’re doing exactly.
>“Calibration” is the concept you get when people use a model of data points and then demand the probabilities derived from it act like frequencies.
From reading some of the online calibration lit it seems that when you set out to achieve calibration regardless of what nature throws at you, you end up with something hard to make sense of from the perspective of any particular decision. The entire discussion shifts to what you get out of the algorithm in the long run, and the need to understand what is going on on a more concrete level gets brushed outside. I find this frustrating about some of the recent work in CS, particularly when statements are being made about how the predictions must be trustworthy to decision-makers.
You’d have to define “predictive skill” here I think. Quoting directly from the Dawid paper that Jessica mentioned, which has the context of weather forecasting:
“…experienced weather forecasters are, on the whole, well calibrated. Although this is not by itself a sufficient condition for their forecasts to be ‘good’ (it would hold, for example, for a forecaster who invariably gave the long-term relative frequency of rain as his precipitation probability), it has often been taken to be a minimal desirable property.”
I would say calibration is necessary for a skilled predictor, but not sufficient. One can imagine that a highly skilled predictor would reliably produce calibrated forecasts where the forecasted event probability tends towards certainty (or some notion of a “best possible prediction” given the information at hand).
This is just a technical definition of what it means for a model to be calibrated. If your model is calibrated, then your 30% prediction for the chance of rain means that the probability of rain follows a Bernoulli(0.3) distribution. Then if you have N independent events with probabilities p[1], …, p[N], you expect the random variable representing the number of successes to be a sum of Bernoulli-distributed random variables with probabilities p[1], …, p[N]. This is just the definition of what it means to be calibrated.
I’m curious about the role of marginal versus conditional calibration in this discussion.
(Ignoring the role of causal inference in decision making, and just focusing on prediction for the time being)
The marginal distribution p_true(Y) of an outcome Y is well calibrated when evaluated on data from p_true. So your model is marginally calibrated if it matches p_model(Y)=p_true(Y). But we may want to use a conditional p_model(Y|X) to approximate p_true(Y|X) to make inferences about a person with features X for individualized decision making. For this purpose, using the marginal distribution of Y may not be good. Even worse, we could use a bad conditional model p_wrong(Y|X) that happens to be marginally calibrated but maybe even gives bad predictions for everyone (worse than just using the marginal).
On the other hand, some papers a few years ago (I can’t find them this second) have shown impossibility results in general for testing calibration of conditional distributions p_model(Y|X) under data p_true(X,Y) when X is continuous (e.g. vitals, labs in a hospital).
After that, there has been lots of work on approximations to conditional calibration and related concepts in coverage/conformal inference including
– sub-population calibration for all possible subpopulations [Calibration for the (Computationally-Identifiable) Masses https://arxiv.org/abs/1711.08513%5D
– Conformal Prediction With Conditional Guarantees https://arxiv.org/pdf/2305.12616
I bring up this in part because there are a lot of papers in ML that advocate for calibration, only study it from a marginal context, and don’t remark on the incongruence between marginal calibration and conditional prediction.
I’d be really curious about the OP’s take on how these differences play into the above questions on decision making. I don’t know much about conformal inference which seems to be related, and part of the OP’s research area, and would love any pointers for the newcomer in context of the above questions!
Mark
>there are a lot of papers in ML that advocate for calibration, only study it from a marginal context, and don’t remark on the incongruence between marginal calibration and conditional prediction.
Definitely. The theorists are aware I’m sure but don’t spend much time on it because why talk about what you can’t do much about? But I worry about the difference between marginal and conditional getting overlooked by those applying these methods. True conditional coverage from a prediction set is impossible, for example, but end-users of conformal prediction sometimes get excited about it as if this is what they are getting.
I don’t think marginal calibration or marginal coverage are really what people need or want. At the same time, I’m not against these methods in settings where the alternative is nothing or some hard-to-analyze heuristic. I just don’t think you can take the “guarantees” at face value, especially when humans are the end recipients of the predictions. You’re giving me information about some class of events that I probably have a very foggy notion of. What I do with that is not necessarily easy to predict. I would love to see more discussion of the “human interface” of these methods, because I think there’s lots to be desired there.
Isn’t this just another way of talking about calibration? The point prediction is a and the uncertainty we hope is calibrated is a standard deviation of b.
I disagree. I want calibrated inference because I want my probability statements to be “accurate” in the same way you mentioned for a normal model of velocity.
For example, posterior predictive checks are a kind of predictive calibration test. We do them because they represent what our model says about predicting more data. But we evaluate them through calibration.
I think the reason people are worried about calibration in ML is that it’s easier to build a useful app on top of a system that gives you calibrated probabilities in classification than one that just gives you a best guess. It’s also better to calculate things in expectation, like the number of people who have a disease or are going to vote a given way in an election, or hit a certain way in a baseball game.
What does this mean? Let’s say I’m doing a linear regression and I care about calibrated prediction—how do I make that a model about frequencies?
Bob, in a Bayesian model of data outcomes, each data points is a prediction of what that data point will be, not a prediction of the long run frequency for that data point.
First of all, there is no long run frequency for that data point. There’s just that data point. Second of all, even if you believe the experiment is repeatable and has a long run frequency you haven’t yet built the model to describe the frequency.
I mean, maybe you have, maybe you really do believe that the long run frequencies are normally distributed (ie. You have a delta function prior for the shape of the logpdf) But in the vast majority of cases this is not what’s actually up. What’s up is that there’s an unknown frequency distribution F(x) which has a shape. Either you bin the data and count frequencies, and the unknown is the height of the frequency bin (which I described above https://statmodeling.stat.columbia.edu/2024/08/14/when-is-calibration-enough/#comment-2377565), or you leave the data fine grained and the unknown is an infinite dimensional curve, usually you parameterize this curve in some way with finite parameters, like a Gaussian Mixture or a cdf function represented by a orthogonal polynomial or some such thing.
Your unknown now is the frequency distribution shape, and your posterior distribution over the frequency distribution tells you how much uncertainty you have about the frequencies involved.
You can’t just pick some convenient shape like a normal distribution and make the claim that you are precisely aware of an infinite dimensional vector which describes that shape yet are ignorant of the scale and location parameters and then hope to have any form of “calibration”
If you want to describe frequencies you need to make the shape be your unknown.
Bob, I think I agree with the second part of your post but I’m unsure what to make of the concept of checking the calibration of our uncertainty about velocity in this example. It seems like it could be calibrated in the sense of relatively faithfully representing our information about that unknown parameter, but in this example there is no standard deviation of the velocity ‘b’, just uncertainty about ‘a’ represented by a normal with sigma=b. What is the ‘reference set’ against which we can check our calibration for ‘b’?
Everyone’s talking calibration, but nobody’s talking sharpness (variance, entropy, etc.). I really like this paper’s take on Bayesian calibration:
Probabilistic Forecasts, Calibration and Sharpness
Tilmann Gneiting, Fadoua Balabdaoui, Adrian E. Raftery
https://academic.oup.com/jrsssb/article/69/2/243/7109375
What surprises me is that nobody seems to be engaging in a discussion of trading calibration for a reduction in sharpness the same way we trade bias for a reduction in variance in the hope of having lower expected error. I’ve only just started thinking about this for Monte Carlo methods. We’re only going to run them to low accuracy (e.g., an ESS of 100 to 10,000, say, which gives us a standard error scale of 1/10 or 1/100 of a standard deviation), so it seems like if we have a method with a little bit of bias, it shouldn’t be an issue.
Thanks, reading the paper now!
Here’s a recent paper on trading off individual calibration and sharpness https://proceedings.mlr.press/v119/zhao20e/zhao20e.pdf
This was the paper I was coming to share in the comments (calibration and sharpness). It’s what I always think of when I hear people talk about just calibration.
> What surprises me is that nobody seems to be engaging in a discussion of trading calibration for a reduction in sharpness the same way we trade bias for a reduction in variance in the hope of having lower expected error.
What is surprising is the fixation of some people on calibration as if it was a worthwhile end in itself – https://x.com/predict_addict being the poster boy.
Not gonna say that this post wasn’t partially triggered by certain memes involving calibration versus Bayesianism I encountered on X.
I’m new to the concept of “sequential predictions,” so I may have misunderstood this post. If I’m understanding it correctly, they are predictions where the results of previous predictions are used to improve accuracy.
When we are concerned about the short term, but a model will only be calibrated in the long term, why can’t we downweight these long-term models so we are prioritizing using short term models for decision making?
Sequential predictions just means making decisions over time. It comes up in a few different fields. Here’s a short description https://simons.berkeley.edu/programs/DataDriven2022
>When we are concerned about the short term, but a model will only be calibrated in the long term, why can’t we downweight these long-term models so we are prioritizing using short term models for decision making?
You can use weighting schemes to try to do well over shorter periods of time if you expect the process to be something you can model at any given time but shifting over time. This is what some of the conformal prediction lit does to try to ensure calibrated uncertainty quantification even when the typical assumptions (like exchangability) don’t hold.
However, often in the CS literature, when sequential predictions are the focus (i.e., online learning) the assumption is that the outcomes that realize may be adversarial, i.e., chosen to throw off your ability to predict them. Naturally this makes everything much more challenging. Foster and Vohra showed that you can still achieve calibrated predictions by using randomized forecasts. It’s cool that this is even possible. But, as motivated me to write this post, it can also be hard to conceive of what you are really gaining, since the individual predictions are not informative.
> Calibration is typically understood as the property of a prediction model or algorithm where for all predictions that are approximately b, the event realizes at a rate of b, and this is true for all values of b (where b is binned to some extent). […] If the model/algorithm is calibrated in the sequential setting, then expected calibration error–the weighted average error of the predictions–goes to zero as the number of periods increases.
What does “expected calibration error–the weighted average error of the predictions” mean?
Predicting coin flips as 50% heads is perfectly calibrated in the sense of the property you defined: “all predictions are 50% heads and the event realizes at this rate.”
It seems that the “expected calibration error” is zero but how do you define the “(weighted average) error of the predictions”?
For each distinct predicted value in the sequence of predictions, calculate the absolute difference between the prediction and the realized fraction of positive instances when that was the prediction. Then sum all these differences, weighting each by the fraction of total instances that got that prediction. That is ECE.
Thanks.
In the abstract, for machine learning prediction, “calibration is enough [for decision-making]” when the aleatoric (irreducible) uncertainty and epistemic (reducible) uncertainty have been adequately separated, and the sources of the latter have been decomposed in a manner that is interpretable and actionable. Until recently, that has been very difficult to achieve in practical settings with high-dimensional inputs, which reflects why post-hoc calibration methods have in the past been viewed as having limited importance for decision-making (and in some cases, being misleading, if they target the wrong quantities). However, interestingly, large neural networks can be quite effective for assisting in controlling the sources of epistemic uncertainty, a key (and perhaps counterintuitive) benefit of large neural networks. (It’s counterintuitive in that neural networks have themselves been viewed as challenging objects over which to assess uncertainty.)