Abstract 1 Introduction 2 Technical Overview 3 Omniprediction From Smooth Calibration 4 Smooth Calibration Error Approximates Lower Distance References Appendix A Omniprediction With Respect to Nearby Calibrated Predictors Appendix B Inapproximability of Upper Distance

The Importance of Being Smoothly Calibrated

Parikshit Gopalan ORCID Apple, Palo Alto, CA, USA    Konstantinos Stavropoulos111Work done during an internship at Apple. ORCID University of Texas at Austin, TX, USA    Kunal Talwar ORCID Apple, Palo Alto, CA, USA    Pranay Tankala222Work done during an internship at Apple. ORCID Harvard University, Cambridge, MA, USA
Abstract

Recent work has highlighted the centrality of smooth calibration [12] as a robust measure of calibration error. We generalize, unify, and extend previous results on smooth calibration, both as a robust calibration measure, and as a step towards omniprediction, which enables predictions with low regret for downstream decision makers seeking to optimize some proper loss unknown to the predictor.

  • We present a new omniprediction guarantee for smoothly calibrated predictors, for the class of all bounded proper losses. We smooth the predictor by adding some noise to it, and compete against smoothed versions of any benchmark predictor on the space, where we add some noise to the predictor and then post-process it arbitrarily. The omniprediction error is bounded by the smooth calibration error of the predictor and the earth mover’s distance from the benchmark. We exhibit instances showing that this dependence cannot, in general, be improved. We show how this unifies and extends prior results [5, 10] on omniprediction from smooth calibration.

  • We present a crisp new characterization of smooth calibration in terms of the earth mover’s distance to the closest perfectly calibrated joint distribution of predictions and labels. This also yields a simpler proof of the relation to the lower distance to calibration from [1].

  • We use this to show that the upper distance to calibration cannot be estimated within a quadratic factor with sample complexity independent of the support size of the predictions. This is in contrast to the distance to calibration, where the corresponding problem was known to be information-theoretically impossible: no finite number of samples suffice [1].

Keywords and phrases:
Smooth Calibration, Omniprediction, Distance to Calibration
Copyright and License:
[Uncaptioned image] © Parikshit Gopalan, Konstantinos Stavropoulos, Kunal Talwar, and Pranay Tankala; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Machine learning theory
Related Version:
Full Version: https://arxiv.org/abs/2603.16015
Editor:
Huijia (Rachel) Lin

1 Introduction

Consider the setting of binary classification, where we wish to learn a predictor p:𝒳[0,1] based on labeled samples (𝐱,𝐲) drawn from a distribution 𝒟 on 𝒳×{0,1}. The prediction p(x) represents our estimate of the conditional probability at x that the label is 1. Perfect calibration, a classical notion which originates in the forecasting literature [4], requires that 𝐄[𝐲|p(𝐱)]=p(𝐱). Calibration guarantees several desirable properties to any downstream decision maker who uses these predictions to minimize a proper loss function. These guarantees have the flavor of ensuring that the decision maker can trust the predictor, as if it were the Bayes optimal predictor.

The property of calibration that is most relevant to our work is that it ensures no-regret with respect to all post-processings; this was first shown in the classic work of Foster and Vohra [5]. Indeed, a predictor p is calibrated if and only if p has lower expected loss than κp for all post-processing functions κ:[0,1][0,1] and all proper loss functions :[0,1]×{0,1}. Restated in the language of omniprediction (introduced in [8] and applied in the context of calibration by [10, 9]), a calibrated predictor is a perfect (,𝒞)-omnipredictor, where the loss family comprises all proper loss functions, and the hypothesis class 𝒞 comprises all post-processings of p itself.

Perfect calibration is not an achievable goal in practice for both computational and information-theoretic reasons. This has led to a long line of work that aims at finding notions of approximate calibration that are more computationally tractable to achieve and to verify, and which preserve the desirable properties of calibration for decision making. Much of this work focuses on two main questions:

  • How should we measure the calibration error of our predictor, so as to have a measure that is both robust and efficient? This question has been studied in [12, 14, 1, 2, 3].

  • What kind of loss minimization guarantees for downstream decision makers can we get from approximate notions of calibration? This question has been studied in [2, 11, 9].

We refer the reader to the recent survey [6] for more details.

The work of [1] suggested a property testing-inspired approach to the first question: measure the calibration error of predictor by the distance from the nearest perfectly calibrated predictor. They refer to this notion as the distance to calibration. However, implementing this approach immediately runs into some basic questions: How do we measure distance between predictors? What family of perfectly calibrated predictors should we consider? Tackling these questions leads to a surprisingly subtle and intricate theory of distance to calibration [1, 6]; we will present formal statements later in the paper. In particular, the notion of smooth calibration error, introduced in the early work of [12], plays a key role in this theory. The main result of [1] is that smooth calibration error is equivalent (up to constants) to a measure they call the lower distance to calibration, and this is information-theoretically the best efficient approximation to the distance to calibration that one can hope to achieve.

Smooth calibration has several desirable properties as a calibration measure: it is efficient to estimate and Lipschitz continuous in the predictions. However, smooth calibration by itself does not give the type of omniprediction guarantees that one gets from perfect calibration; there are fairly simple examples of smoothly calibrated predictors p and proper losses where p incurs significantly worse expected loss than some post-processing κp. An elegant result of [10] shows that this situation can be remedied by adding some noise to the predictions before making decisions. They show that this results in an omniprediction guarantee for all proper loss functions, but where the hypothesis class is the space of all calibrated predictors for the distribution 𝒟, rather than post-processings. Another difference is that the quality of the omniprediction guarantee decays as the distance to the calibrated predictor being used as a baseline increases. Thus, smooth calibration gives some omniprediction guarantees, provided we add random noise to smooth the predictions.

Other relaxations of perfect calibration that yield no-regret for post-processing have been studied in the literature. It is known that the expected calibration error (𝖤𝖢𝖤) is an upper bound on the regret [13]. Recently, Hu and Wu [11] introduced the notion of calibration decision loss (𝖢𝖣𝖫) which exactly captures this regret. But both these notions are known to be inefficient to estimate in the predictions-only access model where we are given random samples (p(𝐱),𝐲) for (𝐱,𝐲)𝒟 [9].

1.1 Preliminaries

We begin with a key new definition: prediction-label distributions (PLDs).

Definition 1 (Prediction-Label Distribution).

Consider the space 𝒮=[0,1]×{0,1}, where we view the first coordinate as a predicted probability p[0,1] and the second as a label y{0,1}. A Prediction-Label Distribution (PLD) is a probability distribution μ over 𝒮. In the case that μ has a density function, which we also denote μ:𝒮+, it satisfies

y{0,1}01μ(p,y)𝑑p=1.

We denote the set of all PLDs by 𝖯𝗅𝖽. The space 𝒮2 is equipped with the standard 1 distance. Given distributions μ,ν𝖯𝗅𝖽, we denote the earth mover’s distance between them by W(μ,ν). (More precisely, W(μ,ν)=infπ𝐄(𝐩,𝐲,𝐩,𝐲)π[d((𝐩,𝐲),(𝐩,𝐲))], where the infimum is over all couplings π of μ with ν, and the metric is d((p,y),(p,y))=|pp|+|yy|.)

The notion of a PLD has been implicit in prior work on calibration (see for instance [1]), but the terminology is new, and reasoning directly about this space, and the earth mover’s distance over it will play a key part in our results. A typical PLD is depicted in Figure 1.

Figure 1: A typical PLD μ, with μb=Pr(𝐩,𝐲)μ[𝐲=b]. Note that μ0+μ1=1.
Definition 2 (Calibration).

The PLD μ is (perfectly) calibrated if it satisfies the condition

μ(p,0)p=μ(p,1)(1p)

for all p[0,1].333Strictly speaking, we need this condition to hold for a set of measure 1, but we will ignore measure-theoretic subtleties throughout this paper. We denote the set of perfectly calibrated PLDs by 𝖢𝖺𝗅𝖯𝗅𝖽.

Let 𝖯(𝒳)={p:𝒳[0,1]} denote the space of predictors on 𝒳. Given a distribution 𝒟 on 𝒳×{0,1}, we associate p with a PLD p𝒟, defined to be the distribution of the prediction-label pair (p(𝐱),𝐲) when (𝐱,𝐲)𝒟. We define 𝖯𝗅𝖽(𝒟)𝖯𝗅𝖽 to be the set of PLDs of the form p𝒟, and 𝖢𝖺𝗅(𝒟) to be the set of PLDs in 𝖯𝗅𝖽(𝒟) where p𝖯(𝒳) is perfectly calibrated for the distribution 𝒟, meaning that 𝐄[𝐲|p(𝐱)]=p(𝐱). We define τ(𝒟)=Pr(𝐱,𝐲)𝒟[𝐲=1] to be the expected label under 𝒟. Given τ[0,1], we define 𝖯𝗅𝖽=τ𝖯𝗅𝖽 to be the subset of PLDs μ so that Prμ[𝐲=1]=τ. We further define 𝖢𝖺𝗅=τ=𝖯𝗅𝖽=τ𝖢𝖺𝗅 to be the subset of calibrated PLDs. We have

𝖢𝖺𝗅(𝒟)𝖢𝖺𝗅=τ(𝒟)𝖢𝖺𝗅.

Calibration error measures and loss functions are typically defined as the expectation of a suitable function on 𝒮 under the PLD p𝒟. For instance, writing (𝐩,𝐲)μ to denote sampling according to μ, the expected calibration error (ECE) is defined as

𝖤𝖢𝖤(μ)=𝐄(𝐩,𝐲)μ|𝐄[𝐲𝐩]𝐩|,

whereas the smooth calibration error [12] is defined as

𝗌𝗆𝖢𝖤(μ)=maxψ𝖫𝗂𝗉𝐄(𝐩,𝐲)μ[ψ(𝐩)(𝐲𝐩)] (1)

where 𝖫𝗂𝗉 is the family of 1-Lipschitz functions ψ:[0,1][1,1]. Being a property only of PLDs ensures that loss functions and calibration measures are defined uniformly for binary classification tasks across domains, regardless of whether the data are images, text, or numeric.

1.2 Prior Work

To set the stage for our work, we discuss the most relevant prior work in detail.

Distance to Calibration

Given a distribution 𝒟 on 𝒳×{0,1} and predictors p,q:𝒳[0,1], we define the expected 1 distance as

1𝒟(p,q)=𝐄𝐱𝒟|p(𝐱)q(𝐱)|.

[1] define the true distance to calibration as the expected 1 distance to the closest calibrated predictor in 𝖢𝖺𝗅(𝒟). However, it is hard to reason about such predictors without knowing the underlying space 𝒳. In going from the predictor p to the PLD p𝒟, we have lost information about the space 𝒳 over which the predictor p is defined, which makes measuring distance to calibration challenging. The solution proposed in [1] was, given the joint distribution μ=p𝒟, to consider all spaces 𝒳, predictors p:𝒳[0,1] and distributions 𝒟 such that p𝒟=μ. By considering the minimum and maximum distance to calibration over all such spaces, they define two new calibration measures, the lower and upper distance to calibration, which sandwich the true distance to calibration between them. Formally:

Definition 3.

Given a PLD μ, let lift(μ) be the set of all predictor-distribution pairs (p,𝒟) such that p𝒟=μ.444The underlying feature space 𝒳 over which p and 𝒟 are defined can vary for the elements in lift(μ). Given a predictor p:𝒳[0,1] and a distribution 𝒟 on 𝒳×{0,1},

  • The (true) distance to calibration is defined as

    𝖽𝖢𝖤𝒟(p)=infq:𝒳[0,1]q𝒟𝖢𝖺𝗅(𝒟)1𝒟(p,q).
  • The upper distance to calibration is defined as

    𝖽𝖢𝖤¯(p𝒟)=sup(p,𝒟)lift(p𝒟)𝖽𝖢𝖤𝒟(p).
  • The lower distance to calibration is defined as

    𝖽𝖢𝖤¯(p𝒟)=inf(p,𝒟)lift(p𝒟)𝖽𝖢𝖤𝒟(p).

Observe that unlike 𝖽𝖢𝖤, both 𝖽𝖢𝖤¯ and 𝖽𝖢𝖤¯ are only functions of the PLD p𝒟, and not the underlying domain 𝒳. From the definitions, it follows that

𝖽𝖢𝖤¯(p𝒟)𝖽𝖢𝖤𝒟(p)𝖽𝖢𝖤¯(p𝒟).

[1] ask how easy it is to compute each of the quantities 𝖽𝖢𝖤¯, 𝖽𝖢𝖤, and 𝖽𝖢𝖤¯ from sample access to p𝒟. They show that the notion of smooth calibration error from [12] (defined in Equation (1)) holds the key to the answer.

Theorem 4 ([1]).

1/2𝖽𝖢𝖤¯(μ)/𝗌𝗆𝖢𝖤(μ)2 for every PLD μ.

Further, [1] show that the upper and lower distance are within a quadratic factor of each other:

𝖽𝖢𝖤¯(μ)4𝖽𝖢𝖤¯(μ), (2)

and that it is information theoretically impossible to estimate the true distance better than within a quadratic factor. This tells us that 𝗌𝗆𝖢𝖤(p𝒟) is essentially the best approximation one can get to both the true distance 𝖽𝖢𝖤𝒟(p), and the lower distance 𝖽𝖢𝖤¯(p𝒟) (up to constant factors). They leave open the question of whether we can compute the upper distance 𝖽𝖢𝖤¯(p𝒟) any better.

Omniprediction From Smooth Calibration

A (bounded) loss function is a function :𝒮[1,1], and a proper loss is one where if the label 𝐲Ber(p), then 𝐄[(q,𝐲)] is minimized at q=p. We let denote the family of all bounded proper losses, and define the notion of omnipredictors, specialized to this family.

Definition 5 (Omnipredictor, [8]).

Let 𝒟 be a distribution on 𝒳×{0,1}, let be the family of bounded proper losses, and 𝒬𝖯(𝒳) be a set of predictors. A predictor p:𝒳[0,1] is an (,𝒬,α)-omnipredictor if for every and q𝒬, it holds that

𝐄[(p(𝐱),𝐲)]𝐄[(q(𝐱),𝐲)]+α.

The setting α=0 corresponds to perfect omniprediction, where p is optimal compared to 𝒬, while α=2 is trivial since our losses are bounded in [1,1]. So we will consider α[0,2). We are interested in settings where one can have α bounded away from 2, ideally tending to 0.555Like calibration, expected loss is a property of a PLD, rather than the predictor itself. However, in omniprediction, the underlying distribution 𝒟 is fixed, which fixes the marginal distribution on 𝐲. Hence, we will think of omniprediction both as a property of PLDs that lie in 𝖯𝗅𝖽=τ(𝒟), and of predictors p𝖯(𝒳), with the associated PLD p𝒟.

Foster and Vohra [5] showed that a perfectly calibrated predictor p is a perfect omnipredictor for all proper losses.

Theorem 6 ([5]).

Let p be perfectly calibrated. Let K={κκ:[0,1][0,1]} be all possible post-processings. Then for any , and κK we have 𝐄[(𝐩,𝐲)]𝐄[(κ(𝐩),𝐲)].666They prove this for the squared loss, but it extends straightforwardly to all proper losses.

One cannot replace perfect calibration with smooth calibration in their statement: For every ε>0, we will give an example of a PLD μ with 𝗌𝗆𝖢𝖤(μ)ε, a loss , and post-processing κ so that

𝐄μ[(𝐩,𝐲)]=1,𝐄μ[(κ(𝐩),𝐲)]=0,

This raises the question of whether it is at all possible to show omniprediction guarantees against a rich class of post-processings for a smoothly calibrated predictor.

A novel omniprediction guarantee for smooth calibration error was shown in the recent work of [10]. There are two important ways in which their guarantee differs from the Foster-Vohra result:

  1. 1.

    Smoothed predictions. Rather than using the predictions 𝐩 of a smoothly calibrated predictor directly, they add some noise 𝐳 sampled uniformly from the interval [σ,σ] and truncate the result to [0,1]. We will denote this noise distribution by 𝐳[±σ] and the truncated predictor by 𝐩𝐳.

  2. 2.

    The baseline class. The omniprediction guarantee holds for the baseline class of all calibrated PLDs μ𝖢𝖺𝗅=τ(𝒟), which satisfy accuracy in expectation. This is a rich class that includes the Bayes optimal PLD μ=(𝐄[𝐲|𝐱],𝐲), and it is impossible to hope for an omniprediction guarantee with any fixed α<1. Instead, they allow α to degrade with the earth mover’s distance between p𝒟 and μ.

Formally, [10] show that smoothing p gives an omnipredictor for 𝖢𝖺𝗅=τ(𝒟) with the following guarantee:777The exact statement of Theorem 7 does not appear in [10], but it can be derived from Theorem 3.1 therein. There are some differences between their statement and ours. They sample the noise from a suitably chosen DP mechanism (Gaussian or Laplace), but we prefer random shifts because they are simpler, and as we will see, they correspond to random bucketing which is commonly used in practice. Although their bound is not stated in terms of W(,), the way we have stated it is equivalent by Lemma 15.

Theorem 7 ([10]).

Let p𝖯(𝒳), 𝒟 be a distribution on 𝒳×{0,1} and ν𝖢𝖺𝗅=τ(𝒟). For and σ(0,1], we have

𝐄(𝐩,𝐲)p𝒟,𝐳[±σ][(𝐩𝐳,𝐲)]𝐄(𝐪,𝐲)ν[(𝐪,𝐲)]+O(σ+1σW(𝐩𝒟,ν)).

To connect this to smooth calibration, we observe the smallest that the earth mover’s distance can be is 𝖽𝖢𝖤¯(p)=Θ(𝗌𝗆𝖢𝖤(p)), by the result of [1]. We can take σ=𝗌𝗆𝖢𝖤(p𝒟), to get an omniprediction error bound of α=O(𝗌𝗆𝖢𝖤(p𝒟)). Thus the guarantee is particularly meaningful for smoothly calibrated predictors, where α goes to 0. Since smooth calibration error can be efficiently estimated, one can estimate the level of noise to add to the predictor before making decisions.

Given these two incomparable results, there are two natural questions that arise:

  • Can one extend the Foster-Vohra guarantee (Theorem 6) and show an omniprediction guarantee for smoothly calibrated predictors, against the class of post-processings?

  • Can one relax the assumption of calibration on 𝐪 in Theorem 7 and show an omniprediction guarantee against all PLDs in 𝖯𝗅𝖽=τ(𝒟)?

1.3 Our Results

In this work, we prove some new results and reprove some old results about the properties of smooth calibration, both as a replacement for perfect calibration that gives strong omniprediction guarantees, and as a measure of the distance to calibration.

  • We present a general omniprediction result for smooth calibration, that strengthens and generalizes the Foster-Vohra result by allowing post-processings and the [10] result by comparing with all nearby predictors, whether or not they are calibrated.

  • We present a crisp new characterization of the lower distance to calibration in terms of earthmover distance from the set 𝖢𝖺𝗅. We use this to present an arguably simpler proof of the tight connection between smooth calibration error and the lower distance to calibration.

  • We show that the upper distance to calibration cannot be estimated to better than a quadratic factor, with sample complexity independent of the support size of the predictor.

Common to all our results is a view of calibrated predictors on a space being sandwiched between the larger set of all calibrated distributions on prediction-label pairs, and the smaller set of calibrated post-processings, which is loosely inspired by convex relaxations in discrete optimization. This view informs our formulation of theorem statements, we believe it also results in more general and clarifying proofs.

2 Technical Overview

In this section, we present full technical statements of our results and the intuition behind them, without getting into proof details.

2.1 Omniprediction From Smooth Calibration

We show an omniprediction guarantee for smoothly calibrated predictors, against the baseline class of post-processings of predictors in 𝖯𝗅𝖽=τ(𝒟).888The guarantee stated would also hold for ν𝖯𝗅𝖽, but changing the label distribution is not natural for omniprediction. We write fg if f=O(g) and pz for [p+z]01, where []01 denotes projection onto the interval [0,1].

Theorem 8.

Let p𝖯(𝒳), 𝒟 be a distribution on 𝒳×{0,1}, μ=p𝒟 and ν𝖯𝗅𝖽=τ(𝒟). For any bounded proper loss , post-processing function κ:[0,1][0,1], and σ(0,1],

𝐄(𝐩,𝐲)μ𝐳[±σ][(𝐩𝐳,𝐲)]𝐄(𝐪,𝐲)ν𝐳[±σ][(κ(𝐪𝐳),𝐲)]σ+1σ(𝗌𝗆𝖢𝖤(μ)+W(μ,ν)).

Our theorem allows for arbitrary PLDs ν𝖯𝗅𝖽=τ(𝒟), allowing the guarantee to decay with W(μ,ν). It also allows for arbitrary post-processings κ. Thus it gives a common generalization of the baseline classes used in [5] and [10].

In the setting where 𝐪=𝐩, our result implies the following bound:

Corollary 9.

Let (𝐩,𝐲)μ and let 𝐳 be uniform over [σ,σ] and independent from (𝐩,𝐲). Then, the following is true for any proper loss :[0,1]×{0,1}[1,1] and any κ:[0,1][0,1]:

𝐄(𝐩,𝐲)μ𝐳[±σ][(𝐩𝐳,𝐲)(κ(𝐩𝐳),𝐲)]σ+𝗌𝗆𝖢𝖤(μ)σ. (3)

This can be interpreted as saying that smoothly calibrated predictors are omnipredictors with respect to arbitrary post-processings, provided we add noise to the predictions. This gives a smoothed analysis analogue for the Foster-Vohra result for smooth calibration. It is essential to smooth the comparison baseline 𝐪 with random noise, the above statement is not true if we replace κ(𝐩𝐳) with κ(𝐩), and only assume that p is smoothly calibrated.

A similar statement may be derived by combining the results of Blasiok and Nakkiran [3], showing that adding noise (from a different distribution) to a smoothly calibrated predictor yields small 𝖤𝖢𝖤, with the results of [13, 11], showing that small 𝖤𝖢𝖤 suffices for omniprediction guarantees against post-processings.

In the setting of [10], where we restrict the benchmark class to calibrated PLDs from 𝖢𝖺𝗅=τ(𝒟), we do not need to smooth 𝐪, and can show a quantitatively stronger bound:

Theorem 10.

Let p𝖯(𝒳), 𝒟 be a distribution on 𝒳×{0,1}, μ=p𝒟 and ν𝖢𝖺𝗅=τ(𝒟). For any bounded proper loss , and σ(0,1]

𝐄(𝐩,𝐲)p𝒟𝐳[±σ][(𝐩𝐳,𝐲)]𝐄(𝐪,𝐲)ν[(𝐪,𝐲)]σ+𝗌𝗆𝖢𝖤(μ)σ+W(μ,ν).

Since ν is calibrated, post-processing does not reduce the loss. Hence the same bound holds for all post-processings κ(𝐪). In comparison to Theorem 7, our result replaces the term W(μ,ν)/σ with 𝗌𝗆𝖢𝖤(μ)/σ+W(μ,ν). Corollary 16 shows that 𝗌𝗆𝖢𝖤(μ) is within constant factors of the minimum value of W(μ,ν) over all ν𝖢𝖺𝗅=τ(𝒟). For such ν, the two bounds are similar up to constants. But when W(μ,ν)𝗌𝗆𝖢𝖤(μ), we incur the smaller penalty of W(μ,ν) rather than W(μ,ν)/σ, thus improving over Theorem 7.

Our proof uses techniques from the literature on loss outcome-indistinguishability, introduced in [7] and used in the calibration context by [9]. However, we believe a key contribution is identifying the right statement itself, which is rather delicate. To illustrate this, consider a simple example: Consider a two point space 𝒳={x0,x1}. The distribution 𝒟 is uniform on (x0,0) and (x1,1). We will consider the proper version of 0-1 loss, {0,1}:[0,1]×{0,1}{0,1} where

{0,1}(p,y)=|1(p1/2)y|.

In other words, if we are on the correct side of 1/2, we suffer 0 loss, else the loss is 1. This is essentially a special case of the v-shaped losses which are studied in the literature. Now consider the following predictors:

  • The good predictor g where g(x0)=1/2ε,g(x1)=1/2+ε, which has expected loss 0.

  • The bad predictor b where b(x0)=1/2+ε,b(x1)=1/2ε, which has expected loss 1.

  • The uniform predictor u where u(x0)=u(x1)=1/2, which has expected loss 1/2.

Smooth calibration error does not distinguish between good and bad (or even uniform), since 𝗌𝗆𝖢𝖤(b)=𝗌𝗆𝖢𝖤(g)=ε, while u is perfectly calibrated. We observe that for 𝐳[±σ], the total variation distance between g𝐳 and b𝐳 is dTV(g𝐳,b𝐳)2ε/σ. Finally, g=κ(b) where κ(p)=1p. With these observations in hand, we can deduce the following (see the full version for more details):

  • The gap between expected loss of p and κ(p) can be 1, even when 𝗌𝗆𝖢𝖤(p)ε. To see this, take p=b, q=κ(p)=g. Thus one cannot hope for a direct analogue of the Foster-Vohra bound for smooth calibration without any smoothing.

  • The same example shows that the gap between the expected loss of p𝐳 and q=κ(p) can be 1/2, even when 𝗌𝗆𝖢𝖤(p)ε, and W(p𝒟,q𝒟)ε. Note that when σε, p𝐳 is essentially the same as u, so it has expected loss 1/2. Thus smoothing p alone but not smoothing q is not sufficient.

  • By taking p=b and q=g, we see that the gap between the expected loss of p and q𝐳 can be 1/2, since now q𝐳 is essentially the same as u for σε. So smoothing q alone without smoothing p is also not sufficient.

Further, in the full version, we give examples which illustrate that the omniprediction error must scale linearly with each of the three terms on the RHS of Theorem 8.

2.2 Lower Distance to Calibration

Our next set of results uses what we call the earth mover’s distance to calibration, denoted 𝖽𝖤𝖬𝖢, to prove new results regarding the upper and lower distance to calibration, as well as provide new proofs of existing results. We begin with the definition of 𝖽𝖤𝖬𝖢:

Definition 11 (𝖽𝖤𝖬𝖢).

Given μ𝖯𝗅𝖽, the earth mover’s distance to calibration is

𝖽𝖤𝖬𝖢(μ)=infν𝖢𝖺𝗅W(μ,ν).

To begin, we use 𝖽𝖤𝖬𝖢 to give a simple proof of Theorem 4, which states that the smooth calibration error approximates the lower distance to calibration up to a constant factor. This result originally appeared in [1], with an alternate proof in [3]. Next, we show that the upper distance to calibration is hard to approximate within a quadratic factor in the prediction-only access model, where we have access to samples of the form (𝐩,𝐲). Specifically, Theorem 20 is a sample complexity lower bound that scales with Ω(k), where k is the support size of the prediction distribution. This result complements prior work showing that the (ordinary) distance to calibration is impossible to estimate from samples within a quadratic factor in the same model [1].

Lower Distance and Earth Mover’s Distance

Our new proof of Theorem 4 is based on the following two lemmas. The first lemma relates smooth calibration error to the earth mover’s distance to calibration, which the second lemma in turn equates to the lower distance to calibration. Interestingly, the second lemma can be viewed as an alternate and natural definition of the lower distance to calibration.

Lemma 12.

1/2𝖽𝖤𝖬𝖢(μ)/𝗌𝗆𝖢𝖤(μ)2 for every PLD μ.

Lemma 13.

𝖽𝖢𝖤¯(μ)=𝖽𝖤𝖬𝖢(μ) for every PLD μ.

It is clear that these two results yield Theorem 4 when combined. It remains to prove them. The crucial step in the proof of Lemma 12 uses the apparent flexibility in the definition of 𝖽𝖤𝖬𝖢, which allows one to change the 𝐲 distribution when designing a nearby calibrated predictor. In particular, given μ=(𝐩,𝐲), it is easy to see that ν=(𝐩,𝐲~) where 𝐲~Ber(𝐩) is calibrated, and W(μ,ν)=Θ(𝗌𝗆𝖢𝖤(μ)) (see [6, Lemma 3.4]). The proof of Lemma 13, in contrast, shows that this flexibility in the 𝐲 distribution, while convenient, was not actually necessary and that we can restrict ν to lie in the set 𝖢𝖺𝗅=τ where τ=Prμ[𝐲=1].

In contrast to our proof strategy, which centers on the earth mover’s distance to the set 𝖢𝖺𝗅, it turns out the prior proof of [1] was effectively considering 𝖢𝖺𝗅=τ. To see this connection, we use a helpful interpretation of 𝖽𝖢𝖤¯, proposed in [1], as the following infimum:

Lemma 14 ([1]).

𝖽𝖢𝖤¯(μ)=inf𝐄|𝐩𝐪|, where the infimum is taken over all triples of joint random variables (𝐩,𝐪,𝐲) such that (𝐩,𝐲)μ and (𝐪,𝐲) is calibrated.

The next lemma (proved in Section 4) shows how to move from such triples to earth mover’s distance.

Lemma 15.

For any two μ,ν𝖯𝗅𝖽=τ for τ[0,1], we have that W(μ,ν)=inf𝐄[|𝐩𝐪|], where the infimum is taken over all triples of joint random variables (𝐩,𝐪,𝐲) such that (𝐩,𝐲)μ and (𝐪,𝐲)ν.

Putting these two lemmas together, it follows that the prior characterization of 𝖽𝖢𝖤¯ can be viewed as the earth mover’s distance to 𝖢𝖺𝗅=τ for an appropriate choice of τ:

Corollary 16.

𝖽𝖢𝖤¯(μ)=infν𝖢𝖺𝗅=τW(μ,ν), where τ=Pr(𝐩,𝐲)μ[𝐲=1].

As the proof in the present paper shows, working with the earth mover’s distance to 𝖢𝖺𝗅 directly, rather than to 𝖢𝖺𝗅=τ, is equivalent and leads to a cleaner picture. Furthermore, the original proof of the lower bound of Theorem 4 from [1] used an argument based on linear programming duality, which in hindsight resembles a modified version Kantorovich-Rubinstein duality for earth mover’s distance. Our proof seems to circumvent this argument by directly using Kantorovich-Rubinstein duality, which we of course need not rederive, in the proof of Lemma 12. The results of this section also yield the following interesting corollary, which we state purely in terms of earth mover’s distance to calibration.

Corollary 17.

Given a PLD μ, the following are equal up to constant factors:

  1. (a)

    Its earth mover’s distance to calibration, 𝖽𝖤𝖬𝖢(μ):

    inf{W(μ,ν)|ν𝖢𝖺𝗅},
  2. (b)

    Its earth mover’s distance to calibration while preserving the marginal of 𝐲:

    inf{W(μ,ν)|ν𝖢𝖺𝗅=τ},

    where τ=Pr(𝐩,𝐲)μ[𝐲=1].

  3. (c)

    Its earth mover’s distance to calibration while preserving the marginal of 𝐩:

    inf{W(μ,ν)|ν𝖢𝖺𝗅 and Pr(𝐩,𝐲)μ[𝐩t]=Pr(𝐩,𝐲)ν[𝐩t] for all t[0,1]}.

More precisely, a=bc2a.

2.3 Intractability of the Upper Distance

We have already defined the sets 𝖯𝗅𝖽 and 𝖯𝗅𝖽=τ(𝒟), which are supersets of the set 𝖯𝗅𝖽(𝒟) of PLDs induced by 𝖯(𝒳). We now define the set of post-processings of a predictor, which are a subset of the space 𝖯(𝒳) that will be relevant for our discussion of upper distance to calibration.

Definition 18 (Post-processings of predictors and PLDs).

Let K={κ:[0,1][0,1]} denote the set of all possible post-processing functions. Let K(p)={κp}κK denote all post-processings of a predictor p, and observe that K(p)𝖯(𝒳). Given a PLD μ=(𝐩,𝐲), let K(μ) denote the set of all PLDs of the form (κ(𝐩),𝐲)κK, and let 𝖢𝖺𝗅(μ)=𝖢𝖺𝗅K(μ).

We have the following inclusions among the set of PLDs for any predictor p and distribution 𝒟:

𝖯𝗅𝖽(𝒟)K(p𝒟),𝖢𝖺𝗅(𝒟)𝖢𝖺𝗅(p𝒟).

In order to prove the existence of a PLD in 𝖯𝗅𝖽(𝒟) with a certain property, one typically proves the existence of a PLD in K(p𝒟). This is equivalent to only considering predictors in K(p) rather than all predictors from 𝖯(𝒳). However, K is not a particularly tractable set, since it consists of all post-processing functions. Optimizing over it efficiently can be hard, as was recently shown in the context of Calibration Decision Loss by [9]. We show a similar barrier to efficiently estimating the upper distance to calibration.

We show that accurate estimates of the upper distance to calibration, which are asymptotically better than what is implied by the quadratic relation to the lower distance (Equation (2)) are hard to obtain in the prediction-only access model. Specifically, we prove a sample complexity lower bound that scales with the size of the support of the distribution, which may be very large, even if finite. Our result complements prior work showing that the (ordinary) distance to calibration is not just hard, but impossible to estimate in this model with the same level of accuracy. As we shall soon see, both of these results are most easily understood from the perspective of the earth mover’s distance to calibration.

A key concept in the proof of the result of this section, as well as later results in this paper, is the following almost balanced PLD. The distribution corresponds to a predictor which always predicts 1/2±ε. The direction of the deviation from 1/2, however, is uncorrelated with the true label, which is a uniformly random bit.

Definition 19 (Almost Balanced PLD).

Given ε>0, the ε-almost balanced PLD is the distribution on 𝒮=[0,1]×{0,1} with mass 1/4 on each of (1/2ε,0), (1/2ε,1), (1/2+ε,0), and (1/2+ε,1).

Our next result will construct several examples, each comprising a domain 𝒳, a predictor p:𝒳[0,1], and a distribution 𝒟 over 𝒳×{0,1}. Roughly speaking, in each example, the prediction-label distribution p𝒟 is similar to the ε-almost balanced PLD, but distinguishing the scenarios from samples of the form (p(𝐱),𝐲) may be hard. Our proof of the theorem will make use of intuitive visual arguments enabled by the earth mover’s perspective. Before we state the theorem, we briefly recall the following view of 𝖽𝖢𝖤¯ in terms of 𝖢𝖺𝗅(μ) from [1]:

𝖽𝖢𝖤¯(μ)=infκ𝐄(𝐩,𝐲)μ|κ(𝐩)𝐩|,

where κ:[0,1][0,1] ranges over all calibrated post-processings, meaning 𝐄[𝐲|κ(𝐩)]=κ(𝐩).

Theorem 20 (Succinct Version of Theorem 26).

Fix parameters ε>0, k, and δij for (i,j){0,1}×[k]. There exist four 4-tuples (𝒳a,𝒟𝒳a,pa,pa), (𝒳b,𝒟𝒳b,pb,pb), (𝒳c,𝒟𝒳c,pc,pc), and (𝒳d,𝒟𝒳d,pd,pd) with the following properties. First, |𝒳c|=|𝒳d|=k. Second, cases (a) and (b) do not depend on the δij parameters. Finally, if δij are sampled i.i.d. from an appropriate continuous distribution, then:

  1. (i)

    Case (a), which has 𝖽𝖢𝖤Ω(ε), is impossible to distinguish with any positive advantage from case (b), which has 𝖽𝖢𝖤O(ε2), given any finite number of prediction-label samples.

  2. (ii)

    It requires at least Ω(k) prediction-label samples to distinguish (with constant advantage in expectation over the choice of δij) case (c), which has 𝖽𝖢𝖤¯Ω(ε), from case (d), which has 𝖽𝖢𝖤¯O(ε2) (with probability 1 over the choice of δij).

In particular, 𝖽𝖢𝖤 cannot be estimated within a better-than-quadratic factor from prediction-label samples, and 𝖽𝖢𝖤¯ cannot be estimated within a better-than-quadratic factor from any number of prediction-label samples that is independent of the support size of the distribution of predictions.

Observe that part (i) of Theorem 26 is precisely the prior result of [1] regarding the inapproximability of 𝖽𝖢𝖤 in the prediction-only access model. Part (ii) is our new result regarding 𝖽𝖢𝖤¯. Working with PLDs and earth mover’s distance greatly simplifies the task of finding explicit examples which exhibit separations between various measures; rather than conjuring up a clever space 𝒳, we simply find PLDs in 𝖯𝗅𝖽 or K(p𝒟) that exhibit the desired separation.

3 Omniprediction From Smooth Calibration

In this section, we prove Theorems 8. Recall that 𝐳[±σ] denotes 𝐳Unif[σ,σ]. Both theorems consider the smoothed predictor p𝐳=[p+𝐳]01, An equivalent way to interpret the smoothing operation is as follows. Draw 𝐰Unif[0,2σ] and round p to the nearest point in the randomly shifted grid

𝐰={0,1}{[𝐰+2iσ]01:i}.

For any fixed p[0,1], the two procedures produce random variables with the same distribution.

We start with some simple lemmas.

Lemma 21.

Let z[σ,σ] and p[0,1]. Then we have dTV(Bern(p),Bern(pz))σ.

We skip the simple proof. The next lemma shows that adding noise makes bounded functions Lipschitz.

Lemma 22.

If f:[0,1][1,1] is measurable and 𝐳 is uniform in [σ,σ], then the function fσ with fσ(p)=𝐄[f(p𝐳)] is O(1/σ)-Lipschitz in p.

Proof.

Let p,q[0,1]. If 𝐳[σ,σ], then the total variation distance between the random variables p𝐳 and q𝐳 is O(|pq|/σ). This is because the density of p+𝐳 is D1(t)=𝟏[|tp|σ]/2σ and the density of q+𝐳 is D2(t)=𝟏[|tq|σ]/2σ. Therefore:

dTV(p+𝐳,q+𝐳)=12t=|D1(t)D2(t)|𝑑t|pq|σ.

The result follows from the fact that post-processing (i.e., clipping and applying f) does not increase the total variation distance.

We now prove our main omniprediction result for smooth calibration, which we restate below.

Theorem 8. [Restated, see original statement.]

Let p𝖯(𝒳), 𝒟 be a distribution on 𝒳×{0,1}, μ=p𝒟 and ν𝖯𝗅𝖽=τ(𝒟). For any bounded proper loss , post-processing function κ:[0,1][0,1], and σ(0,1],

𝐄(𝐩,𝐲)μ𝐳[±σ][(𝐩𝐳,𝐲)]𝐄(𝐪,𝐲)ν𝐳[±σ][(κ(𝐪𝐳),𝐲)]σ+1σ(𝗌𝗆𝖢𝖤(μ)+W(μ,ν)).

We use the notation 𝐲p to denote the random variable following the Bernoulli distribution with probability of success p. Our proof will follow the loss OI technique introduced by [7], where we start from a label distribution where the desired omniprediction guarantee holds true by Bayes optimality, and then bound the cost of modifying the label distribution. Since the predictor we wish to show omniprediction guarantees for is 𝐩𝐳, the appropriate label distribution is 𝐲𝐩𝐳 where 𝐄[𝐲𝐩𝐳|𝐩𝐳]=𝐩𝐳. Switching between 𝐲𝐩𝐳 and 𝐲 is enabled by the following lemma:

Lemma 23.

Let :[0,1]×{0,1}[1,1] be a bounded, but not necessarily proper loss function. Then

|𝐄[(𝐩𝐳,𝐲)]𝐄[(𝐩𝐳,𝐲𝐩𝐳)]|σ+𝗌𝗆𝖢𝖤(μ)σ. (4)
Proof.

Following [7], defining (p)=(p,1)(p,0), we can write

(p,y)=(p,0)+y(p).

Define the function w(p)=𝐄𝐳[(p𝐳)]. Since ||1, ||2. Hence Lemma 22 implies that w(p) is O(1/σ)-Lipschitz. Hence we have

|𝐄[(𝐩𝐳,𝐲)]𝐄[(𝐩𝐳,𝐲𝐩)]|=𝐄[(𝐩𝐳)(𝐲𝐲p)]=𝐄[w(𝐩)(𝐲𝐩)]O(𝗌𝗆𝖢𝖤(μ)σ). (5)

where the last inequality is from the definition of smooth calibration, since σw(p) is 1-Lipschitz. Further we have

|𝐄[(𝐩𝐳,𝐲𝐩)(𝐩𝐳,𝐲𝐩𝐳)]|σ (6)

This is an application of Lemma 21 to the bounded function (𝐩𝐳,y), and then sampling y according to 𝐲𝐩 and 𝐲𝐩𝐳, and then taking expectations over 𝐩𝐳.

Equation (4) follows from Equations (5) and (6) and the triangle inequality.

Proof of Theorem 8.

Lemma 15, implies the existence of a joint distribution (𝐩,𝐪,𝐲) of random variables in [0,1]×[0,1]×{0,1} such that (𝐩,𝐲)μ, (𝐪,𝐲)ν and 𝐄[|𝐩𝐪|]=W(μ,ν).

Let 𝐳[±σ] for σ(0,1]. Recall that 𝐲𝐩𝐳{0,1} is such that 𝐄[𝐲𝐩𝐳|𝐩𝐳]=𝐩𝐳, in other words, 𝐩𝐳 is the Bayes optimal predictor for 𝐲𝐩𝐳. Since is proper, for any κ:[0,1][0,1]:

𝐄[(𝐩𝐳,𝐲𝐩𝐳)]𝐄[(κ(𝐩𝐳),𝐲𝐩𝐳)]. (7)

By applying Lemma 23 to the loss function ,

|𝐄[(𝐩𝐳,𝐲)]𝐄[(𝐩𝐳,𝐲𝐩𝐳)]|σ+𝗌𝗆𝖢𝖤(μ)σ. (8)

Since Lemma 23 holds for any bounded loss, even if it is not proper, we may apply it for ~(p,y)=(κ(p),y) which is clearly bounded. We obtain the following:

|𝐄[(κ(𝐩𝐳),𝐲𝐩𝐳)]𝐄[(κ(𝐩𝐳),𝐲)]|σ+𝗌𝗆𝖢𝖤(μ)σ. (9)

By Lemma 22, for y{0,1}, the function

fy(p)=𝐄𝐳[±σ][(κ(p𝐳),y)]

is O(1/σ)-Lipschitz in p, hence |fy(p)fy(q)|O(|pq|/σ). Taking expectations over 𝐩,𝐪 and 𝐲, we get:

|𝐄[(κ(𝐩𝐳),𝐲)]𝐄[(κ(𝐪𝐳),𝐲)]|𝐄[|𝐩𝐪|]σ. (10)

Using Equations (9) and (10), the triangle inequality, and the fact that 𝐄[|𝐩𝐪|]=W(μ,ν)

|𝐄[(κ(𝐩𝐳),𝐲𝐩𝐳)]𝐄[(κ(𝐪𝐳),𝐲)]|σ+𝗌𝗆𝖢𝖤(μ)σ+W(μ,ν)σ. (11)

The desired result follows by starting from Equation (7) and

  • Replacing 𝐄[(𝐩𝐳,𝐲𝐩𝐳)] on the LHS with 𝐄[(𝐩𝐳,𝐲)] by Equation (8)

  • Replacing 𝐄[(κ(𝐩𝐳),𝐲𝐩𝐳)] on the RHS with 𝐄[(κ(𝐪𝐳),𝐲)] by Equation (11).

4 Smooth Calibration Error Approximates Lower Distance

In this section, we prove Lemmas 12 and 13, which immediately imply Theorem 4 when combined. To begin, we recall their respective statements:

Lemma 12. [Restated, see original statement.]

1/2𝖽𝖤𝖬𝖢(μ)/𝗌𝗆𝖢𝖤(μ)2 for every PLD μ.

Lemma 13. [Restated, see original statement.]

𝖽𝖢𝖤¯(μ)=𝖽𝖤𝖬𝖢(μ) for every PLD μ.

Of the two proofs, the proof of Lemma 12 is significantly simpler:

Proof of Lemma 12.

To prove the lower bound, we must show that 𝗌𝗆𝖢𝖤(μ)<2ε whenever 𝖽𝖤𝖬𝖢(μ)<ε. First, by the definition of 𝖽𝖤𝖬𝖢, we can construct jointly distributed pairs (𝐩,𝐲) and (𝐩,𝐲) such that the former is distributed according to μ, the latter is perfectly calibrated, and the two are close in expectation:

𝐄[d((𝐩,𝐲),(𝐩,𝐲))]=𝐄|𝐩𝐩|+𝐄|𝐲𝐲|<ε.

Next, to bound 𝗌𝗆𝖢𝖤(μ), consider any 1-Lipschitz function w:[0,1][1,1]. Then,

𝐄[w(𝐩)(𝐲𝐩)]=
=𝐄[w(𝐩)((𝐲𝐩)(𝐲𝐩))]<ε+𝐄[(w(𝐩)w(𝐩))(𝐲𝐩)]<ε+𝐄[w(𝐩)(𝐲𝐩)]=0.

In the above equation, the first two terms on the right are <ε by the ε-closeness of (𝐩,𝐲) and (𝐩,𝐲) in expectation. The third term is 0 by calibration of (𝐩,𝐲), which means that 𝐄[𝐲|𝐩]=𝐩.

To prove the upper bound, we use the observation from [6] that when the smooth calibration error is small, it is easy to construct a nearby perfectly calibrated predictor by altering the conditional distribution of the label. Specifically, if (𝐩,𝐲)μ, then define 𝐲~|𝐩Ber(𝐩) and let ν be the distribution of (𝐩,𝐲~). Then, ν𝖢𝖺𝗅 and for any function f:𝒮[1,+1], we have

|𝐄[f(𝐩,𝐲)]𝐄[f(𝐩,𝐲~)]|=|𝐄[(f(𝐩,1)f(𝐩,0))(𝐲𝐩)]|.

By Kantorovich-Rubinstein duality, the supremum of the left side over all 1-Lipschitz f is equal to W(μ,ν). The right side is at most 2𝗌𝗆𝖢𝖤(μ) since the Lipschitz constant of f(,1)f(,0) is at most twice that of f. We conclude that 𝖽𝖤𝖬𝖢(μ)2𝗌𝗆𝖢𝖤(μ).

Next, we prove Lemma 13, which equates 𝖽𝖤𝖬𝖢 and 𝖽𝖢𝖤¯ via a novel but simple exchange argument. In what follows, a transport plan π from μ to 𝖢𝖺𝗅 is simply a coupling of μ with some ν𝖢𝖺𝗅. When we say that a plan π moves mass m from A𝒮 to B𝒮, we mean that the associated coupling assigns mass m to the set A×B. Similarly, the cost of a transport plan π is

𝐄((𝐩,𝐲),(𝐩,𝐲))π[d((𝐩,𝐲),(𝐩,𝐲))].
(a) Move some mass to corner.
(b) Move all mass where ratio dictates.
Figure 2: Visualization of the proof of Lemma 13.
Proof of Lemma 13.

Let S0=[0,1]×{0} and S1=[0,1]×{1}. As subsets of the domain 𝒮, these line segments correspond to the events 𝐲=0 and 𝐲=1. By definition, 𝖽𝖤𝖬𝖢(μ) is the infimum cost of all transport plans from μ to 𝖢𝖺𝗅, and 𝖽𝖢𝖤¯(μ) is the infimum cost of transport plans from μ to 𝖢𝖺𝗅 that move no mass between S0 and S1. In more detail: We know from Lemma 14 that 𝖽𝖢𝖤¯ is the infimum cost over triples (𝐩,𝐪,𝐲), as opposed to generic couplings of (𝐩,𝐲) with (𝐪,𝐲) for some 𝐲. This precisely means enforcing Pr[𝐲𝐲]=0 under the coupling, a.k.a. no mass is moved between S0 and S1. (Recall that just before the proof started, we clarified that “moving mass from A to B” means the coupling placing mass on A×B.)

Thus, to prove that 𝖽𝖤𝖬𝖢(μ)=𝖽𝖢𝖤¯(μ), it suffices to show that for every transport plan π from μ to 𝖢𝖺𝗅, there exists a transport plan π from μ to 𝖢𝖺𝗅 that moves no mass between S0 and S1 and is no costlier than π. By taking limits, it suffices to prove the claim in the case that all distributions under consideration are discrete.

To prove the claim, we first observe that π can be viewed as the composition of two consecutive plans π1 and π2 such that π1 only moves mass within each segment and π2 only moves mass between (p,0) and (p,1) for various values p[0,1]. Visually, π1 moves mass “horizontally,” and π2 moves mass “vertically,” as depicted in Figure 2.

Next, suppose that π2 moves some mass from (p,0) to (p,1) for some value p[0,1]. If m0 and m1 were the masses at these points just before the move, then π2 must have moved precisely c=pm0(1p)m1 mass between these two points to achieve calibration. Indeed, after such a move, which costs precisely c, the two points would have masses m0c=(1p)(m0+m1) and m1+c=p(m0+m1), respectively, which are in the correct ratio for calibration.

Alternatively, as shown in Figure 2(a), we could have achieved calibration by moving m=m0(1/p1)m1 mass from (p,0) to (0,0), which does not cross segments and has the same total cost of pm=c. Indeed, after such a move, the two points would have masses (1/p1)m1 and m1, respectively, which are in the correct ratio for calibration. (Yet another option, shown in Figure 2(b), would be to move all the mass at (p,0) and (p,1) to the points (p,0) and (p,1), respectively, where p=m1/(m0+m1). This also has total cost (m0+m1)(pp)=c and satisfies calibration.)

At this point, we have shown that any plan π can be transformed into a plan π with the same cost that moves no mass from S0 to S1. A similar argument applies to shipments from S1 to S0. Thus, there exists an optimal transport plan that moves no mass between segments in either direction, as claimed.

Next, we prove Corollary 17. We recall the statement here for convenience.

Corollary 17. [Restated, see original statement.]

Given a PLD μ, the following are equal up to constant factors:

  1. (a)

    Its earth mover’s distance to calibration, 𝖽𝖤𝖬𝖢(μ):

    inf{W(μ,ν)|ν𝖢𝖺𝗅},
  2. (b)

    Its earth mover’s distance to calibration while preserving the marginal of 𝐲:

    inf{W(μ,ν)|ν𝖢𝖺𝗅=τ},

    where τ=Pr(𝐩,𝐲)μ[𝐲=1].

  3. (c)

    Its earth mover’s distance to calibration while preserving the marginal of 𝐩:

    inf{W(μ,ν)|ν𝖢𝖺𝗅 and Pr(𝐩,𝐲)μ[𝐩t]=Pr(𝐩,𝐲)ν[𝐩t] for all t[0,1]}.

More precisely, a=bc2a.

Proof.

The inequalities ab, ac, and bdCE¯(μ) are all clear, since each inequality compares the infimum over a set to the infimum over a subset. Lemma 13 states that dCE¯(μ)=a. Finally, our proof of the upper bound in Lemma 12 implies that c2a since the only calibrated prediction-label distribution which preserves the marginal of 𝐩 is that of (𝐩,𝐲~), where 𝐲~|𝐩Bernoulli(𝐩).

Finally, we prove Lemma 15. The proof is similar in spirit to the proof of Lemma 13 but simpler. Again, we recall the relevant statement for convenience.

Lemma 15. [Restated, see original statement.]

For any two μ,ν𝖯𝗅𝖽=τ for τ[0,1], we have that W(μ,ν)=inf𝐄[|𝐩𝐪|], where the infimum is taken over all triples of joint random variables (𝐩,𝐪,𝐲) such that (𝐩,𝐲)μ and (𝐪,𝐲)ν.

Proof.

As in the proof of Lemma 13, consider two PLDs μ and ν. In this case, however, we do not assume that either μ or ν is calibrated, but instead require that Pr(𝐩,𝐲)μ[𝐲=1]=Pr(𝐩,𝐲)ν[𝐲=1]=τ. Phrased differently, μ,ν𝖯𝗅𝖽=τ for the same value τ[0,1].

Recall that W(μ,ν) is, by definition, the infimum cost among all transport plans π from μ to ν (i.e. couplings of μ and ν), which may or may not move mass between the segments S0 and S1. Observe that in the case that π does move mass from S0 to S1, it must also move the same amount of mass from S1 back to S0, from our assumption that both μ and ν place exactly τ mass on S1. Similarly, if π moves mass from S1 to S0, it must move the same amount of mass from S0 back to S1.

Ultimately, what we want to prove is the following claim: W(μ,ν) is in fact equal to the infimum cost among the restricted set of couplings of (𝐩,𝐲)μ with (𝐪,𝐲)ν such that Pr[𝐲=𝐲]=1, a.k.a. triples (𝐩,𝐪,𝐲) with (𝐩,𝐲)μ and (𝐪,𝐲)ν. Viewing the coupling as a transport plan, this is equivalent to the restriction that the plan π moves no mass from S0 to S1 and no mass from S1 to S0.

To prove the claim, let π be any transport plan from μ,ν𝖯𝗅𝖽=τ, and factor π into two consecutive plans π1 and π2 as in the proof of Lemma 13 and as depicted in Figure 2, where π1 only moves mass within segments (“horizontally”), and π2 only moves mass between pairs of points of the form (p,0) and (p,1) (“vertically”).

Suppose for the sake of contradiction that π2 moved some positive mass c>0 from S0 to S1 or vice versa. By the preceding discussion, we know that π2 must in fact move c mass from both S0 to S1 and from S1 to S0. Recall that the metric under consideration is 1:

d((p,y),(p,y))=|pp|+|yy|.

Therefore, the cost of π2 is 2c. Had we instead exchanged these two shipments and moved them to their final destinations within segments, the above equality shows that we would have incurred a cost of 2c, proving the claim.

References

  • [1] Jaroslaw Blasiok, Parikshit Gopalan, Lunjia Hu, and Preetum Nakkiran. A unifying theory of distance from calibration. In Proceedings of the 55th Annual ACM Symposium on Theory of Computing, STOC 2023, pages 1727–1740. ACM, 2023. doi:10.1145/3564246.3585182.
  • [2] Jaroslaw Blasiok, Parikshit Gopalan, Lunjia Hu, and Preetum Nakkiran. When does optimizing a proper loss yield calibration? In A. Oh, T. Naumann, A. Globerson, K. Saenko, M. Hardt, and S. Levine, editors, Advances in Neural Information Processing Systems, volume 36, pages 72071–72095. Curran Associates, Inc., 2023.
  • [3] Jaroslaw Blasiok and Preetum Nakkiran. Smooth ECE: principled reliability diagrams via kernel smoothing. In The Twelfth International Conference on Learning Representations, ICLR 2024, 2024.
  • [4] A. P. Dawid. Objective probability forecasts. University College London, Dept. of Statistical Science. Research Report 14, 1982.
  • [5] Dean P. Foster and Rakesh V. Vohra. Asymptotic calibration. Biometrika, 85(2):379–390, 1998.
  • [6] Parikshit Gopalan and Lunjia Hu. Calibration through the lens of indistinguishability. ACM SIGecom Exchanges, 23(1), July 2025. URL: https://www.sigecom.org/exchanges/volume_23/1/HU.pdf.
  • [7] Parikshit Gopalan, Lunjia Hu, Michael P. Kim, Omer Reingold, and Udi Wieder. Loss minimization through the lens of outcome indistinguishability. In Innovations in theoretical computer science (ITCS’23), 2023.
  • [8] Parikshit Gopalan, Adam Tauman Kalai, Omer Reingold, Vatsal Sharan, and Udi Wieder. Omnipredictors. In Innovations in Theoretical Computer Science (ITCS’2022), 2022. arXiv:2109.05389.
  • [9] Parikshit Gopalan, Konstantinos Stavropoulos, Kunal Talwar, and Pranay Tankala. Efficient calibration for decision making. In Proceedings of the ACM SIGACT Symposium on Theory of Computing (STOC’2026), to appear, 2026.
  • [10] Jason D. Hartline, Yifan Wu, and Yunran Yang. Smooth calibration and decision making. In 6th Symposium on Foundations of Responsible Computing, FORC 2025, volume 329 of LIPIcs, pages 16:1–16:26, 2025. doi:10.4230/LIPIcs.FORC.2025.16.
  • [11] Lunjia Hu and Yifan Wu. Calibration error for decision making. In Proceedings of the 65th Annual IEEE Symposium on Foundations of Computer Science (FOCS). IEEE, 2024.
  • [12] Sham Kakade and Dean Foster. Deterministic calibration and nash equilibrium. Journal of Computer and System Sciences, 74(1):115–130, 2008. doi:10.1016/J.JCSS.2007.04.017.
  • [13] Bobby Kleinberg, Renato Paes Leme, Jon Schneider, and Yifeng Teng. U-calibration: Forecasting for an unknown agent. In Gergely Neu and Lorenzo Rosasco, editors, Proceedings of Thirty Sixth Conference on Learning Theory, volume 195 of Proceedings of Machine Learning Research, pages 5143–5145. PMLR, 12–15 July 2023. URL: https://proceedings.mlr.press/v195/kleinberg23a.html.
  • [14] Aviral Kumar, Sunita Sarawagi, and Ujjwal Jain. Trainable calibration measures for neural networks from kernel mean embeddings. In Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pages 2805–2814. PMLR, 2018.

Appendix A Omniprediction With Respect to Nearby Calibrated Predictors

In this section, we prove Theorem 10, where we restrict the baselines class to calibrated predictors in 𝖢𝖺𝗅=τ(𝒟). We restate the theorem below.

Theorem 10. [Restated, see original statement.]

Let p𝖯(𝒳), 𝒟 be a distribution on 𝒳×{0,1}, μ=p𝒟 and ν𝖢𝖺𝗅=τ(𝒟). For any bounded proper loss , and σ(0,1]

𝐄(𝐩,𝐲)p𝒟𝐳[±σ][(𝐩𝐳,𝐲)]𝐄(𝐪,𝐲)ν[(𝐪,𝐲)]σ+𝗌𝗆𝖢𝖤(μ)σ+W(μ,ν).

Our proof will use the V-shaped losses introduced in [13]. These are losses of the form

v(p,y)=(yv)sign(pv),v[0,1].

It is easy to see that v. In fact, these functions form a basis for : [13] show that every loss can be written as

(p,q)=vλvv(p,q),λv0,vλv2. (12)

For a precise statement that accounts for convergence issues, see [9, Lemma 3.5]. This statement ignores linear terms of the form ay+b for a,b. Since the contribution of such terms is independent of the prediction p, we can ignore them as long as we compare PLDs which have the same marginal distribution over 𝐲.

For a loss v and a perfectly calibrated PLD μ𝖢𝖺𝗅, we can compute the expected loss as follows:

𝐄(𝐩,𝐲)μ[v(𝐩,𝐲)] =𝐄[(𝐲v)sign(𝐩v)]=𝐄[(𝐩v)sign(𝐩v)]=𝐄[|𝐩v|] (13)

Next we provide some helpful lemmas whose proofs can be found in the full version (see “related version”). The first shows that when we restrict our attention to fully calibrated predictors, the smoothing operation does not significantly change the value of any proper loss.

Lemma 24.

Let (𝐪,𝐲)𝖢𝖺𝗅 and let 𝐳[±σ]. Then for any proper loss :

|𝐄[(𝐪,𝐲)]𝐄[(𝐪𝐳,𝐲)]|σ.

Our next lemma shows that when restricted to the space 𝖢𝖺𝗅 of calibrated PLDs, every loss in is Lipschitz in the earth mover distance between them.

Lemma 25.

Let μ,ν𝖢𝖺𝗅=τ. Then, for any ,

|𝐄(𝐪,𝐲)μ[(𝐪,𝐲)]𝐄(𝐪,𝐲)ν[(𝐪,𝐲)]|W(μ,ν).

We are now ready to prove Theorem 10.

Proof of Theorem 10.

Consider the joint distribution (𝐩,𝐪,𝐲) such that (𝐪,𝐲)ν for ν𝖢𝖺𝗅=τ, (𝐩,𝐲)μ and 𝐄[|𝐩𝐪|] is the minimum possible. By Lemma 14 and Corollary 16, this minimum is 𝖽𝖢𝖤¯(μ)=W(μ,ν). Note that the distribution ν of (𝐪,𝐲) need not be the same as ν, it could be that W(μ,ν)W(μ,ν). We invoke Theorem 8 with κ being the identity function to obtain the following:

𝐄[(𝐩𝐳,𝐲)]𝐄[(𝐪𝐳,𝐲)]σ+1σ(𝗌𝗆𝖢𝖤(μ)+E[|𝐩𝐪|])σ+𝗌𝗆𝖢𝖤(μ)σ. (14)

By Lemma 24, we get:

𝐄[(𝐪𝐳,𝐲)]𝐄[(𝐪,𝐲)]σ.

By Lemma 25 applied to the calibrated PLDs ν and ν,

|𝐄(𝐪,𝐲)ν[(𝐪,𝐲)]𝐄(𝐪,𝐲)ν[(𝐪,𝐲)]| W(𝐪,𝐪)W(ν,ν)W(μ,ν)+W(μ,ν)
2𝗌𝗆𝖢𝖤(μ)+W(μ,ν).

We obtain the desired result by replacing (𝐪𝐳,𝐲) on the LHS of Equation (14) with (𝐪,𝐲𝐪), at a further cost of O(σ+𝗌𝗆𝖢𝖤(μ))+W(μ,ν).

Appendix B Inapproximability of Upper Distance

In this section, we state and prove the full version of Theorem 20.

Theorem 26.

Fix ε,ε>0, k, and δ0j,δ1j for j[k]. Consider the following tuples (𝒳,𝒟𝒳,p,p):

  1. (a)

    Let 𝒳a={L,R} and define 𝒟𝒳a, pa, and pa as follows:

    x 𝒟𝒳a(x) pa(x) pa(x)
    L 1/2 1/2 1/2ε
    R 1/2 1/2 1/2+ε
  2. (b)

    Let 𝒳b={L0,L1,R0,R1} and define 𝒟𝒳b, pb, and pb as follows:

    x 𝒟𝒳b(x) pb(x) pb(x)
    L0 ε 1 1/2ε
    L1 1/2ε 1/2ε 1/2ε
    R0 ε 0 1/2+ε
    R1 1/2ε 1/2+ε 1/2+ε
  3. (c)

    Building on (a), let 𝒳c={L,R}×[k/2] and define 𝒟𝒳c, pc, and pc as follows:

    x 𝒟𝒳c(x) pc(x) pc(x)
    (L,j) 1/k 1/2 1/2ε+δ0j
    (R,j) 1/k 1/2 1/2+ε+δ1j
  4. (d)

    Building on (b), let

    𝒳d=({L0,R0}×{1,,εk})({L1,R1}×{εk+1,,k/2})

    and define 𝒟𝒳d, pd, and pd as follows:

    x 𝒟𝒳d(x) pd(x) pd(x)
    (L0,j) 1/k 1 1/2ε+δ0j
    (L1,j) 1/k 1/2ε 1/2ε+δ0j
    (R0,j) 1/k 0 1/2+ε+δ1j
    (R1,j) 1/k 1/2+ε 1/2+ε+δ1j

Suppose that ε=ε/(1+2ε), that εk and k/2 are both integers, and that the parameters δij are sampled i.i.d. from a continuous distribution over [ε/2,ε/2]. Then,

  1. (i)

    Case (a), which has 𝖽𝖢𝖤Ω(ε), is impossible to distinguish with any positive advantage from case (b), which has 𝖽𝖢𝖤O(ε2), given any finite number of prediction-label samples.

  2. (ii)

    It requires at least Ω(k) prediction-label samples to distinguish (with constant advantage in expectation over the choice of δij) case (c), which has 𝖽𝖢𝖤¯Ω(ε), from case (d), which has 𝖽𝖢𝖤¯O(ε2) (with probability 1 over the choice of δij).

In particular, 𝖽𝖢𝖤 cannot be estimated from prediction-label samples within a better-than-quadratic factor, and 𝖽𝖢𝖤¯ cannot be estimated within a better-than-quadratic factor from any number of prediction-label samples that is independent of the support size of the distribution of predictions.

(a) Cases (a) and (c) of Theorem 26.
(b) Cases (b) and (d) of Theorem 26.
Figure 3: Optimal transport to calibration for each case of Theorem 26. In cases (a) and (b), the predictions are concentrated entirely on the points 1/2±ε, but in cases (c) and (d), they are instead scattered nearby.

Observe that part (i) of Theorem 26 is precisely the prior result of [1] regarding the inapproximability of 𝖽𝖢𝖤 in the prediction-only access model. Part (ii) is our new result regarding 𝖽𝖢𝖤¯. The proofs of both parts are most easily illustrated by Figure 3.

Proof of Theorem 26.
  1. (i)

    To see that case (a) has 𝖽𝖢𝖤Ω(ε), observe that the Bayes optimal predictor pa is the constant 1/2 function. Therefore, the only calibrated predictor on the domain 𝒳a is the constant 1/2 function itself. Since pa always outputs values exactly ε-far away from 1/2, it follows that 𝖽𝖢𝖤=ε in case (a). In Figure 3(a), this corresponds to the movement of all mass (total of 1) across a distance of length ε, for a total cost of 1εO(ε).

    In contrast, the fact that case (b) has 𝖽𝖢𝖤O(ε2) is witnessed by calibrated predictor

    pb(x)={1/2if x{L0,R0}1/2εif x=L1,1/2+εif x=R1.

    Visually, pb is obtained from pb by “moving” the two ε masses at x{L0,R0}, each over a distance of length ε, to the point 1/2, as shown in Figure 3(b), for a total cost of 2εεO(ε2). More formally,

    𝐄𝐱𝒟𝒳b|pb(𝐱)pb(𝐱)|=2εε+(12ε)0=2ε21+2εO(ε2).

    At this point, all that remains is to show that cases (a) and (b) give rise to identical PLDs. This will imply that they cannot be distinguished from any finite number of prediction-label samples, as claimed. For this, we simply observe that in case (b), the expected label 𝐲 given pb(𝐱)=1/2ε is

    𝐄[𝐲|pb(𝐱)=12ε]=ε1+(12ε)(12ε)ε+(12ε)=12.

    Similarly, one can check that 𝐄[𝐲|pb(𝐱)=1/2+ε]=1/2. Therefore, cases (a) and (b) give rise to the same PLDs, as claimed, completing the proof of part (i).

  2. (ii)

    First, note that cases (c) and (d) are generalizations of cases (a) and (b), respectively, where instead of predicting 1/2±ε, we make predictions that are small random perturbations of 1/2±ε. Thus, our proof strategy for part (ii) will be similar in spirit to our strategy for part (i).

    To see that case (c) has 𝖽𝖢𝖤¯Ω(ε), observe that the Bayes optimal predictor pc is the constant 1/2 function. Therefore, the only calibrated predictor on the domain 𝒳c is the constant 1/2 function itself. Since |δij|ε/2, the predictor pc always outputs values at least ε/2-far away from 1/2. It follows that 𝖽𝖢𝖤¯𝖽𝖢𝖤ε/2 in case (c) (with probability 1 over the choice of δij). We also have 𝖽𝖢𝖤¯3ε/2, and this is again depicted in Figure 3(a).

    The situation in case (d) is somewhat subtler. Intuitively, in case (d), there always exists a “cheap” post-processing κ certifying 𝖽𝖢𝖤¯O(ε2), but such a κ is hard to actually find from a handful of prediction-label samples. This is in contrast to parts (a) and (c), where such a post-processing does not exist, and part (b), where such a post-processing exists and is easy to construct from samples.

    More formally, the fact that case (d) has 𝖽𝖢𝖤¯O(ε2) is witnessed by the following post-processing function κd. The following definition of κd mimics the transition from the predictor pb to pb that we used in case (b) and visualized in Figure 3(b). In defining κd, we crucially use the fact that all perturbation terms δij are distinct. This occurs with probability 1 since they are drawn i.i.d. from a continuous distribution:

    κd(p)={1/2if p=1/2ε+δ0j for some jεk,1/2εif p=1/2ε+δ0j for some j>εk,1/2if p=1/2+ε+δ1j for some jεk,1/2+εif p=1/2+ε+δ1j for some j>εk.

    Indeed, essentially the same analysis as in part (b) shows that κpd is calibrated and

    𝐄𝐱𝒟𝒳d|κ(pd(𝐱))pd(𝐱))|O(ε2).

    Finally, we argue that cases (c) and (d) are hard to distinguish from few i.i.d. prediction-label samples (p(𝐱1),𝐲1),,(p(𝐱s),𝐲s). For this, observe that in a sample of size s, the probability that we see a collision (i.e. sample (p(𝐱),𝐲) for the same point 𝐱=x𝒳 twice) is at most (s2)/kO(s2/k). Moreover, by construction, conditional on seeing no collisions, each conditional distribution 𝐲i|p(𝐱i) is uniform on {0,1} in both cases (c) and (d) over the randomness in the choice of the parameters δij. This is clear for case (c), whereas for case (d), it follows from the same calculation as in part (b):

    ε1+(12ε)(12ε)ε+(12ε)=12.

    We conclude that to distinguish cases (c) and (d) with at least constant advantage over the randomness in δij, we require at least sΩ(k) prediction-label samples.