From Risk to Uncertainty: Generating Predictive Uncertainty Measures via Bayesian Estimation

## Abstract

Abstract Uncertainty quantification in predictive modeling often relies on ad hoc methods as there is no universally accepted formal framework for that. This paper introduces a theoretical approach to understanding uncertainty through statistical risks, distinguishing between aleatoric (data-related) and epistemic (model-related) uncertainties. We explain how to split pointwise risk into Bayes risk and excess risk. In particular, we show that excess risk, related to epistemic uncertainty, aligns with Bregman divergences.
To turn considered risk measures into actual uncertainty estimates, we suggest using the Bayesian approach by approximating the risks with the help of posterior distributions. We tested our method on image datasets, evaluating its performance in detecting out-of-distribution and misclassified data using the AUROC metric. Our results confirm the effectiveness of the considered approach and offer practical guidance for estimating uncertainty in real-world applications.

## 1 Introduction

In the modern world, predictive models are applied in a variety of fields requiring high-risk decisions such as medical diagnosis [, ], finance [, ], autonomous driving [, ] and others.
A careful analysis of model predictions is required to mitigate the risks. Hence, it is of high importance to evaluate the predictive uncertainty of the models.
In recent years, a variety of approaches to quantify predictive uncertainty have been proposed [, , , , , , ]. Specific attention has been paid to the distinction between different sources of uncertainty.
It is commonly agreed to consider two sources [] – the first one, aleatoric uncertainty, effectively reduces to the inherent ambiguity in label distribution, while the second one, epistemic uncertainty, is referred to as the uncertainty due to the “lack of knowledge”. Distinguishing between aleatoric and epistemic uncertainties is crucial in practice because it helps identify whether uncertainty can be reduced by gathering more data (epistemic) or if it is inherent to the problem (aleatoric), thus guiding better decision-making and model improvement. Applications of uncertainty disentanglement include active learning [, ], out-of-distribution detection [, , ], and misclassification detection [].

Despite the practical importance and widespread usage of uncertainty quantification, there is still no common strict formal definition of both types of uncertainty. Essentially, various often ad hoc definitions are adopted that lead to even higher number of different measures to quantify either type of uncertainty (see for example [, , , , , ]). However, it is not clear how all these measures of uncertainty are related to each other. Do they complement or contradict each other? Are they special cases of some general class of measures? In this paper, we are going to address these questions by introducing a proper statistical approach for predictive uncertainty quantification, reasoning in terms of pointwise risk estimation. Our contributions are as follows:

- 1.
We suggest looking at pointwise risk, which is defined as the expected value of a loss function, as a natural measure of predictive uncertainty; see Section 2.
- 2.
We consider a specific class of loss functions, namely proper scoring rules, that allow us to derive a unified treatment for the wide family of uncertainty measures; see Section 3. In particular, we demonstrate that Excess risk, serving as the measure of epistemic uncertainty, can be represented as Bregman divergence, and we show some special instances of it.
- 3.
We incorporate Bayesian reasoning into our framework (see Section 4), showing that commonly used measures of epistemic uncertainty, such as Bayesian Active Learning by Disagreement (BALD) [, ] and Expected Pairwise Kullback-Leibler divergence (EPKL), are special cases within our general approach. We also highlight the limitations of our framework, elaborating on discussions from [, ].
- 4.
We experimentally evaluate the proposed uncertainty measures in various tasks, including out-of-distribution detection and misclassification detection; see Section 6. Our results highlight the conditions under which each measure is most effective, providing practical insights for selecting appropriate uncertainty measures.

## 2 Predictive uncertainty quantification via risks

Figure: A dog, has sufficient probability under $P_{tr}$. Conditional $\eta(x)$ is meaningful.
Refer to caption: extracted/5649368/pics/image1.jpg

Assume we have a dataset $D_{tr}=\{(X_{i},Y_{i})\}_{i=1}^{N}$, where pairs $X_{i}\in\mathbb{R}^{d},Y_{i}\in\mathcal{Y}$ are i.i.d. random variables sampled from a joint distribution $P_{tr}(X,Y)$. We consider a classification task over $K$ classes, i.e. $\mathcal{Y}=\{1,\dots,K\}$. We can express this joint distribution as a product: $P_{tr}(X,Y)=P_{tr}(Y\mid X)P_{tr}(X)$.

In practice, we typically consider a parametric model $P(Y\mid X,\theta)$ with parameters $\theta$ to approximate $P_{tr}(Y\mid X)$.
We denote the true class probabilities for an input $x$ as $\eta(x)=P_{tr}(Y\mid X=x)$, and the predicted probabilities as $\hat{\eta}_{\theta}(x)=P(Y\mid X=x,\theta)$. We will often omit the index $\theta$ and denote the predicted probability vector by $\hat{\eta}$.

### 2.1 Pointwise Risk as a Measure of Uncertainty

The goal of uncertainty quantification is to measure the degree of confidence of predictive models, distinguishing between aleatoric and epistemic sources of uncertainty. Despite its importance, there is no unified definition, leading to diverse methods and measures. In the paper, we introduce uncertainty via the statistical concept of risk.

In machine learning, the main concern is the model’s “error” at a particular input point $x$. One way to express this error is through expected risk.
Let $\ell\colon\mathbb{R}^{K}\times\mathcal{Y}\to\mathbb{R}$ be a loss function that measures how well $\hat{\eta}(x)$ matches the true label $y$. The pointwise risk $\text{R}(\hat{\eta}\mid x)$ for a model $\hat{\eta}$ is defined as:

$$ $\text{R}(\hat{\eta}\mid x)=\int\ell(\hat{\eta}(x),y)\,dP(y\mid X=x),$ (1) $$

Thus, pointwise risk is an expected loss received by a specific predictor $\hat{\eta}$ at a particular input point $x$. Importantly, pointwise risk, while being a natural measure of expected model error, can not be used directly as a measure of uncertainty as it is not possible to compute it due to unknown true data distribution. We will discuss possible ways to transform pointwise risk into the practical uncertainty measure in Section 4.

Note, that we use distribution $P$, which might differ from $P_{tr}$.
If $P(X)\neq P_{tr}(X)$ but $P(Y\mid X=x)=P_{tr}(Y\mid X=x)$ for any $x$, this situation is called “covariate shift”. We will assume $P(Y\mid X=x)$ is valid for any $x$, meaning it is a vector of length $K$ regardless of the input.
Limitations of this assumption are discussed in Section 7.

### 2.2 Aleatoric and Epistemic Uncertainties via Risks

Predictive uncertainty can be divided into two sources. Aleatoric uncertainty expresses the degree of ambiguity in data and does not depend on the model, being an inherent property of data given a particular choice of design.
Epistemic uncertainty, which is vaguely defined, but typically associated with the “lack of knowledge” of choosing the right model parameters $\theta$. Sometimes, when the source is not important, practitioners consider total uncertainty.

Pointwise risk allows for the following decomposition:

$$ $\underbrace{\text{R}(\hat{\eta}\mid x)}_{\text{Total risk}}=\underbrace{\text{ R}_{\text{Bayes}}(x)}_{\text{Bayes risk}}+\underbrace{\text{R}(\hat{\eta}\mid x )-\text{R}_{\text{Bayes}}(x)}_{\text{Excess risk}},$ (2) $$

where $\text{R}_{\text{Bayes}}$ is the pointwise Bayes risk, defined as:

$$ $\text{R}_{\text{Bayes}}(x)=\int\ell(\eta(x),y)\,dP(y\mid X=x).$ $$

The Bayes risk represents the expected error from the true data-generative process $\eta(x)=P(Y\mid X=x)$. It does not depend on the parameters of the model nor the choice of model architecture, and hence can be seen as a measure of aleatoric uncertainty.
The second term in equation (2) is “Excess risk” and represents the difference between the risks computed for the approximation and for the true model at a given input point $x$. Thus, it naturally represents a lack of knowledge about the true data distribution, i.e. epistemic uncertainty. We note that decomposition (2) was previously considered in the context of uncertainty quantification in [, ] but for specific loss functions and without the detailed analysis.

Although the decomposition (2) is useful, it doesn’t provide much information about the properties of these risk functions in general cases. Therefore, we consider a specific class of loss functions, strictly proper scoring rules, which allows us to do a theoretical analysis.

## 3 Risks for Strictly Proper Scoring Rules

Strictly proper scoring rules [] represent a class of loss functions that ensure that the minimizing predictive distributions coincide with the data-generative distribution $P(Y\mid X)$.
Let’s say a forecaster can produce a vector of predicted probabilities $P\in\mathcal{P}_{K}$, where $\mathcal{P}_{K}$ is a space of discrete probability distributions over $K$ classes. Then, $\ell(P,y)\colon\mathcal{P}_{K}\times\mathcal{Y}\to\mathbb{R}$ is the penalty the forecaster would have, given that event $y$ is materialized. Its expected value with respect to some distribution $Q$ we will denote as $\ell(P,Q)=\int\ell(P,y)dQ(y)$.

The scoring rule that for any $P,Q\in\mathcal{P}_{K}$ has the property that $\ell(P,Q)\geq\ell(Q,Q)$ with equality if and only if $P=Q$ is called strictly proper scoring rule. Under mild assumptions (see Theorem 3.2 in []), any strictly proper scoring rule can be represented as:

$$ $\ell(\eta,i)=\langle G^{\prime}(\eta)\,,\,\eta\rangle-G_{i}^{\prime}(\eta)-G( \eta),$ $$

where $\langle.\,,\,.\rangle$ is a scalar product, $G\colon\mathcal{P}_{K}\to\mathbb{R}$ is a strictly convex function, and $G^{\prime}(\eta)=\{G^{\prime}_{1}(\eta),\dots G^{\prime}_{K}(\eta)\}$ is a vector of element-wise subgradients.

Risk decompositions for strictly proper scoring rules.
Here we present the general results for different types of risk (detailed derivations are in Appendix A).

- •
Total Risk (Total Uncertainty):
$\text{R}_{\text{Tot}}(\hat{\eta}\mid x)=\langle G^{\prime}(\hat{\eta})\,,\,
\hat{\eta}\rangle-G(\hat{\eta})-\langle G^{\prime}(\hat{\eta})\,,\,\eta\rangle.$
(3)
Note, that Total risk depends linearly on the true data generative distribution $\eta$.
- •
Bayes Risk (Aleatoric Uncertainty):
$\text{R}_{\text{Bayes}}(x)=-G(\eta).$
(4)
Note, that Bayes risk is a concave function of $\eta$, since function $G$ is convex.
- •
Excess risk (Epistemic Uncertainty):
$\text{R}_{\text{Exc}}(\hat{\eta}\mid x)=D_{G}\bigl{(}\eta~{}\|~{}\hat{\eta}
\bigr{)}.$
(5)
Excess risk is a Bregman divergence [] denoted as $D_{G}\bigl{(}\eta~{}\|~{}\hat{\eta}\bigr{)}$, it is convex in $\eta$.

Specific Instances of Proper Scoring Rules.
Different choices of the convex function $G$ lead to different proper scoring rules. Table 1 shows the results for some popular cases often used in machine learning algorithms (see detailed derivations in Appendix B).

**Table 1: Resulting expressions for different risks, computed for different strictly proper scoring rules. Dependence on $x$ is omitted for clarity. $D_{\text{KL}}$ stands for Kullback-Leibler divergence, CE for Cross-Entropy, and $D_{\text{IS}}$ for Itakura–Saito distance. See Appendix B for full derivations.**
|  | Log score | Brier score | Zero-one score | Spherical score | Negative log score |
| --- | --- | --- | --- | --- | --- |
| $G(\eta)$ | $\sum_{k=1}^{K}\eta_{k}\log\eta_{k}$ | $-\sum_{k=1}^{K}\eta_{k}(1-\eta_{k})$ | $\max_{k}\eta_{k}-1$ | $\|\eta\|_{2}-1$ | $-\sum_{k}\log\eta_{k}$ |
| Aleatoric (Bayes risk) | $\mathbb{H}\eta$ | $1-\|\eta\|^{2}_{2}$ | $1-\max_{k}\eta_{k}$ | $1-\|\eta\|_{2}$ | $\sum_{k}\log\eta_{k}$ |
| Epistemic (Excess risk) | $D_{\text{KL}}[\eta\|\hat{\eta}]$ | $\|\eta-\hat{\eta}\|^{2}_{2}$ | $\max_{k}\eta_{k}-\eta_{\text{argmax}_{k}\hat{\eta}_{k}}$ | $\|\eta\|_{2}\ (1-\langle\frac{\hat{\eta}}{\|\hat{\eta}\|_{2}},\frac{\eta}{\|<br>\eta\|_{2}}\rangle)$ | $D_{\text{IS}}[\eta\|\hat{\eta}]$ |
| Total (Risk) | $\text{CE}[\eta\|\hat{\eta}]$ | $\|\eta-\hat{\eta}\|_{2}^{2}-\|\eta\|_{2}^{2}+1$ | $1-\eta_{\text{argmax}_{k}\hat{\eta}_{k}}$ | $1-\|\eta\|_{2}\ \langle\frac{\hat{\eta}}{\|\hat{\eta}\|_{2}},\frac{\eta}{\|<br>\eta\|_{2}}\rangle$ | $\sum_{k=1}^{K}(\log\hat{\eta}_{k}-1+\frac{\eta_{k}}{\hat{\eta}_{k}})$ |

From Table 1, we see, that some of the risks correspond to well-known aleatoric uncertainty measures. For example, the Bayes risk for the Log score is given by the entropy of the predictive distribution. For the Zero-one score, this component is given by the so-called MaxProb, also widely applied [, , ]. For the Excess risk, we obtain different examples of Bregman divergence which lead to some well-known uncertainty measures when coupled with the Bayesian approach to risk estimation that we discuss in Section 4 below.

Estimating risks.
The derived equations are useful but require access to the true data-generative distribution $\eta$, which is typically unknown.

One approach to deal with this problem was introduced in [], where authors considered a specific model $\hat{\eta}_{\theta}$, namely Nadaraya-Watson kernel regression, as it has useful asymptotic properties to approximate Excess risk. Another approach, the DEUP [] proposed a method for estimating Excess risk by directly training a model to predict errors.
However, in general cases, it is hardly possible to derive these results.
In this paper, we consider a Bayesian approach to approximate $\eta$ that allows us to derive both well-known from the literature and new uncertainty measures based on one unified framework.

## 4 Bayesian Risk Estimation

The derived equations for risks depend on the true data generative distribution $\eta(x)$ and on some approximation of it $\hat{\eta}(x)$. In particular, $\eta(x)$ appears in all the risks and is unknown. One needs to deal with that to obtain a computable uncertainty measure. In the Bayesian paradigm, one considers a posterior distribution over model parameters $p(\theta\mid D_{tr})$ that immediately leads to a distribution over predictive distributions $\hat{\eta}_{\theta}\mid D_{tr}$. The goal of this section is to give a complete recipe for risk estimation under the Bayesian approach.

One can think of the risks as functions of $\eta(x)$ and $\hat{\eta}(x)$ , namely $g\bigl{(}\eta(x),\hat{\eta}(x)\bigr{)}$, where $g$ is a shortcut for any risk function. We can approximate the risks with the help of posterior distribution using one of two ideas:

- 1.
Bayesian averaging of risk. For example, one can consider $\mathbb{E}_{p(\tilde{\theta}\mid D_{tr})}g(\hat{\eta}_{\tilde{\theta}},\hat{
\eta})$ to approximate an impact of the true model $\eta$. In a fully Bayesian paradigm, the same can be done with $\hat{\eta}$ leading to the fully Bayesian risk estimate $\mathbb{E}_{p(\tilde{\theta}\mid D_{tr})}\mathbb{E}_{p(\theta\mid D_{tr})}\,g(
\hat{\eta}_{\tilde{\theta}},\hat{\eta}_{\theta})$.
- 2.
Bayesian model averaging. Alternatively, one may use posterior predictive distribution given by $\hat{\eta}_{D_{tr}}(x)=\mathbb{E}_{p(\tilde{\theta}\mid D_{tr})}\hat{\eta}_{
\tilde{\theta}}(x)$ and plug it in risk equations instead of $\eta$ and/or $\hat{\eta}$.

In general, one can consider four approximation of any risk: $\tilde{g}^{(1,1)}=\mathbb{E}_{p(\tilde{\theta}\mid D_{tr})}\mathbb{E}_{p(
\theta\mid D_{tr})}\,g(\hat{\eta}_{\tilde{\theta}},\hat{\eta}_{\theta})$, $\tilde{g}^{(1,2)}=\mathbb{E}_{p(\tilde{\theta}\mid D_{tr})}\,g(\hat{\eta}_{
\tilde{\theta}},\hat{\eta}_{D_{tr}})$, $\tilde{g}^{(2,1)}=\mathbb{E}_{p(\theta\mid D_{tr})}\,g(\hat{\eta}_{D_{tr}},
\hat{\eta}_{\theta})$ and $\tilde{g}^{(2,2)}=g(\hat{\eta}_{D_{tr}},\hat{\eta}_{D_{tr}})$, where by superscripts we denote the index of approximation ideas discussed above. In this section, we present the resulting formulas for the resulting total, aleatoric, and epistemic uncertainty measures with brief remarks on different approximations. For detailed derivations and discussions, refer to Appendix C.

For Total risk we obtain the following equations:

$$ $\tilde{\text{R}}_{\text{Tot}}^{(1)}(x)=\mathbb{E}_{p(\theta\mid D_{tr})}\Bigl{ (}\langle G^{\prime}(\hat{\eta}_{\theta})\,,\,\hat{\eta}_{\theta}\rangle-G( \hat{\eta}_{\theta})-\langle G^{\prime}(\hat{\eta}_{\theta})\,,\,\hat{\eta}_{D _{tr}}\rangle\Bigr{)},$ $$

and

$$ $\tilde{\text{R}}_{\text{Tot}}^{(2)}(x)=\langle G^{\prime}(\hat{\eta}_{D_{tr}}) \,,\,\hat{\eta}_{D_{tr}}\rangle-G(\hat{\eta}_{D_{tr}})-\langle G^{\prime}(\hat {\eta}_{D_{tr}})\,,\,\hat{\eta}_{D_{tr}}\rangle=-G(\hat{\eta}_{D_{tr}}).$ $$

Note, that due to the linear dependence on $\eta$, approximations for the ground truth led to the same result of $\hat{\eta}_{D_{tr}}$. The two options above aim to approximate the predictive distribution.
The first approximation leads to the Expected Pairwise Proper Scoring Rule (in particular, expected pairwise Cross-Entropy). The second approximation leads to some concave function of $\hat{\eta}_{D_{tr}}$.

For Bayes risk one also obtains only two cases as it doesn’t depend on $\hat{\eta}$:

$$ $\tilde{\text{R}}_{\text{Bayes}}^{(1)}(x)=-\mathbb{E}_{p(\tilde{\theta}\mid D_{ tr})}G(\hat{\eta}_{\tilde{\theta}})\quad\text{and}\quad\tilde{\text{R}}_{\text {Bayes}}^{(2)}(x)=-G(\hat{\eta}_{D_{tr}}).$ $$

Interestingly, $\tilde{\text{R}}_{\text{Bayes}}^{(2)}(x)=\tilde{\text{R}}_{\text{Tot}}^{(2)}(x)$, which effectively means zero Excess risk.
In the Appendix C, we provide a reasoning for which approximation is better for Bayes risk approximation.

For Excess risk we obtain the whole family of approximations:

- •
Expected Pairwise Bregman Divergence (EPBD):
$\tilde{\text{R}}_{\text{Exc}}^{(1,1)}(x)=\mathbb{E}_{p(\tilde{\theta}\mid D_{
tr})}\mathbb{E}_{p(\theta\mid D_{tr})}D_{G}\Bigl{(}\hat{\eta}_{\tilde{\theta}}
~{}\|~{}\hat{\eta}_{\theta}\Bigr{)},$
In a special case of Log score, it is an Expected Pairwise KL (EPKL; [, ]).
- •
Bregman Information (BI):
$\tilde{\text{R}}_{\text{Exc}}^{(1,2)}(x)=\mathbb{E}_{p(\tilde{\theta}\mid D_{
tr})}D_{G}\Bigl{(}\hat{\eta}_{\tilde{\theta}}~{}\|~{}\hat{\eta}_{D_{tr}}\Bigr{
)},$
In a special case of Log score, it is Mutual Information (also known as BALD [, ]).
- •
Reverse Bregman Information (RBI):
$\tilde{\text{R}}_{\text{Exc}}^{(2,1)}(x)=\mathbb{E}_{p(\theta\mid D_{tr})}D_{G
}\Bigl{(}\hat{\eta}_{D_{tr}}~{}\|~{}\hat{\eta}_{\theta}\Bigr{)},$
Its special case for Log score is known as Reverse Mutual Information (RMI; []).
- •
Finally, we obtain that
$\tilde{\text{R}}_{\text{Exc}}^{(2,2)}(x)=D_{G}\Bigl{(}\hat{\eta}_{D_{tr}}~{}\|
~{}\hat{\eta}_{D_{tr}}\Bigr{)}=0,$
which is coherent with the result obtained for the Total risk, when Excess risk (epistemic uncertainty) is equal to 0.

We observe that the general approach presented in this work allows us to obtain many existing uncertainty measures in the case of the Log score loss function while leading to the whole family of new measures (see Table 1). We refer to Appendix C for additional discussion and to Appendix D for the discussion of connections of these approximations to each other.

## 5 Related Work

The field of uncertainty quantification for predictive models, especially neural networks, has seen rapid advancements in recent years. Among these, methods allowing explicit uncertainty disentanglement are particularly interesting due to the ability to use estimates of different sources of uncertainty in various downstream tasks. For instance, epistemic uncertainty is effective in out-of-distribution data detection [, , ] and active learning [, ]. In contrast, aleatoric uncertainty, which is associated with label noise, is useful in misclassification detection [].

Bayesian methods have become popular because they naturally handle distributions of model parameters, leading to prediction uncertainty.
Exact Bayesian inference is very computationally expensive [], so many lightweight versions are used in practice [, , , , ]. Early approaches inspired by Bayesian ideas [, , ] used information-based measures like BALD [] to quantify epistemic uncertainty and measures like entropy or maximum probability for aleatoric uncertainty. These methods, despite different computational costs, are widely used in the field.

However, the practical expense of Bayesian inference, even in its approximate forms, has led to the introduction of more simplified approaches. Some of these methods leverage hidden neural network representations, considering distances in their hidden space as a proxy for epistemic uncertainty estimation [, , , ]. While they offer the advantage of requiring only a single pass over the network, their notion of epistemic uncertainty, often linked to the distance of an object’s representation to training data, captures only a part of the full epistemic uncertainty. Despite this limitation, their efficiency and effectiveness in out-of-distribution detection have made them widely used.

Another class aimed at simplifying Bayesian inference are the so-called second-order models [, , , , , , , ]. These models induce a conjugate prior distribution to the predictive distribution but lack a universally accepted approach for uncertainty quantification. Some methods within this class assess the flatness of the predicted second-order distribution as a proxy for epistemic uncertainty [, , , ], while others introduce a reference distribution, considered to be devoid of specific uncertainty components, and measure distances to them as uncertainty metrics [, ].

Despite the diversity of these approaches, the arbitrary nature of choosing uncertainty measures has led to ambiguity in understanding uncertainty. This paper aims to address this gap by proposing a unified framework that not only categorizes these diverse methods but also offers a more comprehensive understanding of uncertainty quantification.

Related paper [] is close to our work and it looks at Bregman divergence loss functions and their decomposition but does not cover uncertainty quantification or Bayesian approximation.

## 6 Experiments

In this section, we test different uncertainty measures derived from our general framework. Any Bayesian method that produces multiple samples of model weights (or parameters of the first-order distribution) can be used to compute our proposed measures. However, deep ensembles are considered the “gold standard” in uncertainty quantification []. Therefore, we use deep ensembles, trained with various strictly proper scoring rules as loss functions for our experiments.

As training (in-distribution) datasets, we consider CIFAR10 and CIFAR100 [], along with manually created noisy versions where some labels are randomly shuffled (see Section E for details).
We evaluate the proposed measures of uncertainty by focusing on two specific problems: out-of-distribution detection and misclassification detection.
For both problems, we use deep ensembles with 20 members. Each ensemble member shares the same architecture but differs due to randomness in initialization and training. We consider two architectures: VGG19 [] and ResNet18 [] (additional details can be found in Section F).

Our experimental evaluation aims to answer the following questions:

- 1.
Does training with a specific loss function leads to better uncertainty estimates when using the same proper scoring rule for uncertainty measures? For example, does training with Log score (cross-entropy) and evaluating uncertainty with risks based on Log score yield better results than using other scores for uncertainty quantification?
- 2.
Is Excess risk always better than Bayes risk for out-of-distribution detection?
- 3.
Is Bayes risk always better than Excess risk for misclassification detection?
- 4.
Does the choice of approximation strategy matter?

We emphasize that the goal of our experimental evaluation is not to provide new state-of-the-art measures or compete with other known approaches for uncertainty quantification. Instead, we aim to verify whether different uncertainty estimates accurately quantify specific types of uncertainty.

### 6.1 Impact of Matching Scoring Rules on Uncertainty Measures

Figure: Figure 2: Left: AUROC for out-of-distribution detection. Right: AUROC for misclassification detection. Results are stratified by the plug-in proper scoring rule used for risk estimations. The legend indicates “Same” for the matching scoring rules and “Different” for the non-matching scoring rules.
Refer to caption: x1.png

In this section, we address the first question. Our results are shown in Figure 2, which presents the distribution of the area under the ROC curve (AUROC) for different problems when using matching and non-matching scoring rules, averaged over various datasets, risks, and architectures. Note that we excluded two loss functions from the training: the Zero-one score, which is not differentiable, and the Negative log score (Neglog), which is unstable during training.

Our observations indicate that using mismatched scoring rules can lead to poor results for both out-of-distribution detection and misclassification detection. Conversely, when the loss function used during training matches the proper scoring rule applied for uncertainty measures, the results are consistently good. For a more detailed analysis, refer to Appendix G.

Therefore, while the answer to the first question is not absolute, our findings strongly support using matching scoring rules, i.e. the same scoring rule for the training of the model and uncertainty quantification. Using non-matching scoring rules can result in suboptimal performance in some cases.

### 6.2 Evaluating Excess Risk and Bayes Risk for Out-of-Distribution Detection

In this section, we evaluate different types of risks to identify out-of-distribution (OOD) samples. Since the uncertainty associated with OOD detection is epistemic, we expect that Excess risk and Total risk will perform well for this task, while Bayes risk will likely fail.

We used CIFAR10 and CIFAR100 as in-distribution datasets and SVHN [] and blurred versions of CIFAR10 and CIFAR100 as out-of-distribution datasets (details in Appendix E). The Gaussian blur augmentation results in “soft-OOD” samples that maintain the same ground-truth labels and meaningful prediction probability vectors.

To evaluate the metrics, we calculated them on both in-distribution and out-of-distribution objects and then computed the AUROC of the resulting ordering. The results are presented in Table 3. Note that the columns for Bayes and Total risks are averaged over all approximations. The Excess risk is averaged over all approximations, except Inner Inner, as it is equal to 0 (see separate evaluation in Appendix J). The results shown are for the case where the proper scoring rules used for loss function and uncertainty estimation match.

We distinguish between two types of out-of-distribution data: “soft-OOD” and “hard-OOD”. “Soft-OOD”, such as the blurred versions of CIFAR10 and CIFAR100, have predicted probability vectors that are still meaningful. “Hard-OOD” samples, however, have completely non-informative predicted probability vectors (see Section 7 for discussion). For example, when a set of classes is considered during training, but an incoming image does not belong to those classes, the resulting probability distribution over training classes is meaningless.

For “soft-OOD” datasets, the results meet our expectations: Excess risk (which includes BI, RBI, and EPBD) and Total risk perform well. However, for “hard-OOD” datasets, the results are unexpected—Bayes risk typically outperforms Excess risk.

One possible explanation, discussed in detail in Section 7, is that for “hard-OOD” samples, the target distribution $p(y\mid x)$ is not well-defined. Our Bayesian approximation of this distribution seems suboptimal in these cases. In contrast, for “soft-OOD” samples, the approximation remains reasonable, making Excess risk and Total risk effective.

This highlights a crucial limitation of Excess risk (including BI, RBI, and EPBD) as a measure of epistemic uncertainty. These measures naturally appear when approximating Excess risk in a Bayesian way, which assumes a specific form of ground-truth distribution approximation. However, this approximation becomes inaccurate for “hard-OOD” samples, making these measures a poor choice in these cases. This criticism aligns with findings from [, , ], which indicate that Bregman Information (in a particular case of Log score) is not an intuitive measure of epistemic uncertainty and does not follow their proposed axioms.

Therefore, the answer to the second question is not absolute as well. For “soft-OOD” samples, where predicted probability vectors remain meaningful, Excess risk is a good choice. For “hard-OOD” samples, Bayes risk might be better. Total risk consistently shows decent results, making it a safe choice when the nature of incoming data is unknown. A comparison of matching/not-matching results for out-of-distribution detection is in Appendix H.

### 6.3 Is Bayes Risk Always Better than Excess Risk for Misclassification Detection?

**Table 2: AUROC for OOD detection. Best results in bold, second-best underline. By asterisk (*) we denote “soft-OOD”.**
| Dataset |  |  |  |  |
| --- | --- | --- | --- | --- |
|  |  | Bayes | Excess | Total |
| InD | OOD |  |  |  |
| CIFAR10 | Blurred CIFAR10(*) | 84.38 | 87.80 | 85.90 |
| Blurred CIFAR100 | 94.48 | 95.65 | 95.42 |  |
| CIFAR100 | 91.05 | 90.08 | 90.87 |  |
| SVHN | 94.54 | 93.31 | 94.44 |  |
| CIFAR100 | Blurred CIFAR10 | 87.96 | 85.36 | 90.32 |
| Blurred CIFAR100(*) | 71.40 | 77.55 | 74.15 |  |
| CIFAR10 | 79.35 | 72.70 | 79.27 |  |
| SVHN | 84.90 | 73.99 | 84.59 |  |

Now we consider misclassification detection. As in the previous experiment, we present AUROC obtained for different measures of uncertainty. The results are shown in Table 3, which is structured similarly to Table 3.

Misclassification detection is intuitively connected to aleatoric uncertainty. Therefore, we expect Bayes risk and Total risk to perform well in this task, while all instances of Excess risk should perform worse. It is known that standard versions of CIFAR10 and CIFAR100 lack significant aleatoric uncertainty [], making it challenging to demonstrate the usefulness of the appropriate uncertainty measures immediately. To address this, we include noisy versions of these standard datasets, as well as datasets with missing classes, to introduce more noise (see details in Appendix E).

As expected, Bayes risk and Total risk outperform Excess risk for misclassification detection, except for the clean CIFAR10 dataset where the results are very close. Moreover, the difference in performance becomes more significant as more aleatoric noise is introduced into the training dataset.

Hence, the answer to this question is mostly positive. Bayes risk and Total risk are better for misclassification detection, and their advantage becomes more significant with the increase in aleatoric noise in the datasets. A comparison of matching/not-matching results for misclassification detection is in Appendix I.

### 6.4 Does the Choice of Approximation Strategy Matter?

Due to space limitations, we provide a detailed discussion in Appendix J. In summary, our experiments show that the choice of approximation strategy is not always crucial. Different approximation strategies can behave differently across various datasets and experiments, making it difficult to conclusively determine if one is better than another.

## 7 Limitations

We see two limitations to our approach.

#### Valid conditional η ⁢ ( x ) = p ⁢ ( y ∣ x ) 𝜂 𝑥 𝑝 conditional 𝑦 𝑥 \eta(x)=p(y\mid x) italic_η ( italic_x ) = italic_p ( italic_y ∣ italic_x ) for all x 𝑥 x italic_x .

This assumption implies, that regardless of the input $x$, the form of the probability distribution $\eta(x)$ will not change.
This means, that even for inputs, that do not belong to $P_{tr}(X)$, the conditional should produce some categorical vector over the same number of classes.
Let us consider an example of a binary classification problem, where we want our model to distinguish between cats and dogs (see Figure 1). In this case, the distribution of covariates $P_{tr}(X)$ is the distribution over images of all possible cats and dogs.
An image of a pigeon under this distribution should have a negligible probability. Now imagine, that somehow it happened that $x$ is actually an image of a pigeon.
Under our assumption, $\eta(x)$ should be valid, so it should produce a vector of probabilities over two classes: Cats and Dogs, despite an input being an apparent out-of-distribution object. There is no good way to define $\eta(x)$ for such input objects, hence we say it is vague.
However, for unusual (but still in-distribution) inputs, like rare dog breeds, $\eta(x)$ is meaningful.

#### Incorporation of Bayesian reasoning for estimation of η 𝜂 \eta italic_η .

In practice, we do not have access to $\eta(x)$. Hence, we suggested approximating it using the Bayesian approach and proposed two ideas to do it (inner and outer expectations). For Bayes risk the best Bayesian estimate is given by outer expectation (see Appendix C). However, this is not the case for Excess risk. It appears (see discussion in Appendix C) that Excess risk depends on the estimate of the Total risk. But we never know in advance for a particular input $x$, in which regime (overestimated or underestimated Total risk) we are. Thus, we do not know what is the best choice for an approximation to epistemic uncertainty.

## 8 Conclusion

In this paper, we developed a general framework for predictive uncertainty estimation using pointwise risk estimation and strictly proper scoring rules as loss functions. We proposed pointwise risk as a natural measure of predictive uncertainty and derived general results for total, epistemic, and aleatoric uncertainties, demonstrating that epistemic uncertainties can be represented as a Bregman divergence within this framework.

We incorporated Bayesian reasoning into our framework, showing that commonly used measures of epistemic uncertainty, such as Bayesian Active Learning by Disagreement (BALD) and Expected Pairwise Kullback-Leibler divergence (EPKL), are special cases within our general approach. We also discussed the limitations of our framework, elaborating on recent critiques in the literature [, ].

Finally, in our experiments on image datasets, we evaluated these measures for out-of-distribution detection and misclassification detection tasks and discussed which measures are most suitable for each scenario.

## Appendix A Derivations of different risks with proper scoring rules

We will start with the derivation of Total risk. In what follows, we will omit dependency on $x$ for $\eta(x)$ and $\hat{\eta}_{\theta}(x)$.

$$ $\text{R}_{\text{Tot}}(\hat{\eta}_{\theta}\mid x)=\int\ell(\hat{\eta}_{\theta}, y)dP(y\mid x)=\sum_{k=1}^{K}\Bigl{(}\langle G^{\prime}(\hat{\eta}_{\theta})\,, \,\hat{\eta}_{\theta}\rangle-G_{k}^{\prime}(\hat{\eta}_{\theta})-G(\hat{\eta}_ {\theta})\Bigr{)}\eta_{k}=\\ \langle G^{\prime}(\hat{\eta}_{\theta})\,,\,\hat{\eta}_{\theta}\rangle-G(\hat{ \eta}_{\theta})-\langle G^{\prime}(\hat{\eta}_{\theta})\,,\,\eta\rangle.$ $$

Let us now consider Bayes risk:

$$ $\text{R}_{\text{Bayes}}(x)=\int\ell(\eta,y)dP(y\mid x)=\sum_{k=1}^{K}\Bigl{(} \langle G^{\prime}(\eta)\,,\,\eta\rangle-G_{k}^{\prime}(\eta)-G(\eta)\Bigr{)} \eta_{k}=\\ \langle G^{\prime}(\eta)\,,\,\eta\rangle-\langle G^{\prime}(\eta)\,,\,\eta \rangle-G(\eta)=-G(\eta).$ $$

Finally, let us consider Excess risk:

$$ $\text{R}_{\text{Exc}}(\hat{\eta}_{\theta}\mid x)=\underbrace{\int\ell(\hat{ \eta}_{\theta},y)dP(y\mid x)}_{\text{Total risk}}-\underbrace{\int\ell(\eta,y) dP(y\mid x)}_{\text{Bayes risk}}=\\ \langle G^{\prime}(\hat{\eta}_{\theta})\,,\,\hat{\eta}_{\theta}\rangle-G(\hat{ \eta}_{\theta})-\langle G^{\prime}(\hat{\eta}_{\theta})\,,\,\eta\rangle+G(\eta )=\\ G(\eta)-G(\hat{\eta}_{\theta})-\langle G^{\prime}(\hat{\eta}_{\theta})\,,\, \eta-\hat{\eta}_{\theta}\rangle:=D_{G}\Bigl{(}\eta\|\hat{\eta}_{\theta}\Bigr{)}.$ $$

## Appendix B Derivation of risks for specific choices of scoring rules

In this section, we will derive specific equations for Total, Bayes, and Excess pointwise risks to get the estimates of total, aleatoric, and epistemic uncertainties correspondingly. We will omit subscript $\theta$ in this section, indicating an estimate by using a hat.

Recall equations for proper scoring rule and different risks:

$$ $\ell(\eta,i)=\langle G^{\prime}(\eta)\,,\,\eta\rangle-G_{i}^{\prime}(\eta)-G( \eta),$ $$

$$ $\text{R}_{\text{Tot}}=\langle G^{\prime}(\hat{\eta})\,,\,\hat{\eta}\rangle-G( \hat{\eta})-\langle G^{\prime}(\hat{\eta})\,,\,\eta\rangle,$ $$

$$ $\text{R}_{\text{Bayes}}=-G(\eta),$ $$

$$ $\text{R}_{\text{Exc}}=G(\eta)-G(\hat{\eta})+\langle G^{\prime}(\hat{\eta})\,, \,\hat{\eta}-\eta\rangle.$ $$

### B.1 Log score (Cross-Entropy)

$$ $G(\eta)=\sum_{k=1}^{K}\eta_{k}\log\eta_{k},$ $$

$$ $G^{\prime}(\eta)_{k}=1+\log\eta_{k},$ $$

$$ $\ell(\eta,i)=\langle 1+\log\eta\,,\,\eta\rangle-1-\log\eta_{i}-\sum_{k=1}^{K} \eta_{k}\log\eta_{k}=\\ \sum_{k=1}^{K}\eta_{k}\log\eta_{k}+1-1-\log\eta_{i}-\sum_{k=1}^{K}\eta_{k}\log \eta_{k}=-\log\eta_{i},$ $$

$$ $\text{R}_{\text{Tot}}=\sum_{k=1}^{K}\Bigl{(}(1+\log\hat{\eta}_{k})\hat{\eta}_{ k}-\hat{\eta}_{k}\log\hat{\eta}_{k}-(1+\log\hat{\eta}_{k})\eta_{k}\Bigr{)}=\\ \sum_{k=1}^{K}\Bigl{(}\hat{\eta}_{k}\log\hat{\eta}_{k}-\hat{\eta}_{k}\log\hat{ \eta}_{k}-\eta_{k}\log\hat{\eta}_{k}\Bigr{)}=\text{CE}\Bigl{[}\eta\|\hat{\eta} \Bigr{]},$ $$

$$ $\text{R}_{\text{Bayes}}=-\sum_{k=1}^{K}\eta_{k}\log\eta_{k}=\mathbb{H}\eta,$ $$

$$ $\text{R}_{\text{Exc}}=\text{R}_{\text{Tot}}-\text{R}_{\text{Bayes}}=\text{CE} \Bigl{[}\eta\|\hat{\eta}\Bigr{]}-\mathbb{H}\eta=\text{KL}\Bigl{[}\eta\|\hat{ \eta}\Bigr{]}.$ $$

### B.2 Quadratic score (Brier Score)

$$ $G(\eta)=-\sum_{k=1}^{K}\eta_{k}(1-\eta_{k}),$ $$

$$ $G^{\prime}(\eta)_{k}=2\eta_{k}-1,$ $$

$$ $\ell(\eta,i)=\langle 2\eta-1\,,\,\eta\rangle-2\eta_{i}+1+\sum_{k=1}^{K}\eta_{k }(1-\eta_{k})=\\ 2\sum_{k=1}^{K}\eta_{k}^{2}-1-2\eta_{i}+1+1-\sum_{k=1}^{K}\eta_{k}^{2}=\sum_{k =1}^{K}\eta_{k}^{2}-2\eta_{i}+1,$ $$

since constant does not affect optimization, we will use the following:

$$ $\ell(\eta,i)=\sum_{k=1}^{K}\eta_{k}^{2}-2\eta_{i}.$ $$

$$ $\text{R}_{\text{Tot}}=\sum_{k=1}^{K}(2\hat{\eta}_{k}-1)\hat{\eta}_{k}+\sum_{k= 1}^{K}\hat{\eta}_{k}(1-\hat{\eta}_{k})-\sum_{k=1}^{K}(2\hat{\eta}_{k}-1)\eta_{ k}=\\ \sum_{k=1}^{K}(\hat{\eta}_{k}^{2}-2\hat{\eta}_{k}\eta_{k}+\eta_{k}^{2}-\eta_{k }^{2})+1=\|\hat{\eta}-\eta\|_{2}^{2}-\|\eta\|_{2}^{2}+1,$ $$

$$ $\text{R}_{\text{Bayes}}=\sum_{k=1}^{K}\eta_{k}(1-\eta_{k})=1-\|\eta_{k}\|_{2}^ {2},$ $$

$$ $\text{R}_{\text{Exc}}=\text{R}_{\text{Tot}}-\text{R}_{\text{Bayes}}=\|\hat{ \eta}-\eta\|_{2}^{2}-\|\eta\|_{2}^{2}+1-1+\|\eta_{k}\|_{2}^{2}=\|\hat{\eta}- \eta\|_{2}^{2}.$ $$

### B.3 Zero-one score

$$ $G(\eta)=\max_{k}\eta_{k}-1,$ $$

$$ $G^{\prime}(\eta)_{k}=\mathbb{I}[k=\operatorname*{arg\,max}_{j}\eta_{j}],$ $$

$$ $\ell(\eta,i)=\langle\mathbb{I}[k=\operatorname*{arg\,max}_{j}\eta_{j}]\,,\, \eta\rangle-\mathbb{I}[i=\operatorname*{arg\,max}_{j}\eta_{j}]-\max_{k}\eta_{k }+1=\\ \max_{k}\eta_{k}-\mathbb{I}[i=\operatorname*{arg\,max}_{j}\eta_{j}]-\max_{k} \eta_{k}+1=1-\mathbb{I}[i=\operatorname*{arg\,max}_{j}\eta_{j}],$ $$

$$ $\text{R}_{\text{Tot}}=\sum_{k=1}^{K}\Bigl{(}\hat{\eta}_{k}\mathbb{I}[k= \operatorname*{arg\,max}_{j}\hat{\eta}_{k}]-\eta_{k}\mathbb{I}[k=\operatorname *{arg\,max}_{j}\hat{\eta}_{k}]\Bigr{)}-\max_{k}\hat{\eta}_{k}+1=\\ \max_{k}\hat{\eta}_{k}-\eta_{\operatorname*{arg\,max}_{j}\hat{\eta}_{k}}-\max_ {k}\hat{\eta}_{k}+1=1-\eta_{\operatorname*{arg\,max}_{j}\hat{\eta}_{k}},$ $$

$$ $\text{R}_{\text{Bayes}}=1-\max_{k}\eta_{k},$ $$

$$ $\text{R}_{\text{Exc}}=\text{R}_{\text{Tot}}-\text{R}_{\text{Bayes}}=1-\eta_{ \operatorname*{arg\,max}_{j}\hat{\eta}_{k}}-1+\max_{k}\eta_{k}=\eta_{ \operatorname*{arg\,max}_{j}\eta_{k}}-\eta_{\operatorname*{arg\,max}_{j}\hat{ \eta}_{k}}.$ $$

### B.4 Spherical score

$$ $G(\eta)=\|\eta\|_{2}-1,$ $$

$$ $G^{\prime}(\eta)_{k}=\frac{\eta_{k}}{\|\eta\|_{2}},$ $$

$$ $\ell(\eta,i)=\langle\frac{\eta}{\|\eta\|_{2}}\,,\,\eta\rangle-\frac{\eta_{i}}{ \|\eta\|_{2}}-\|\eta\|_{2}+1=\|\eta\|_{2}-\frac{\eta_{i}}{\|\eta\|_{2}}-\|\eta \|_{2}+1=1-\frac{\eta_{i}}{\|\eta\|_{2}},$ $$

$$ $\text{R}_{\text{Tot}}=\sum_{k=1}^{K}\Bigl{(}\frac{\hat{\eta}_{k}\hat{\eta}_{k} }{\|\hat{\eta}\|_{2}}-\frac{\eta_{k}\hat{\eta}_{k}}{\|\hat{\eta}\|_{2}}\Bigr{) }-\|\hat{\eta}\|_{2}+1=1-\sum_{k=1}^{K}\frac{\eta_{k}\hat{\eta}_{k}}{\|\hat{ \eta}\|_{2}}=1-\|\eta\|_{2}\langle\frac{\eta}{\|\eta\|_{2}}\,,\,\frac{\hat{ \eta}}{\|\hat{\eta}\|_{2}}\rangle,$ $$

$$ $\text{R}_{\text{Bayes}}=1-\|\eta\|_{2},$ $$

$$ $\text{R}_{\text{Exc}}=\text{R}_{\text{Tot}}-\text{R}_{\text{Bayes}}=1-\|\eta\| _{2}\langle\frac{\eta}{\|\eta\|_{2}}\,,\,\frac{\hat{\eta}}{\|\hat{\eta}\|_{2}} \rangle+\|\eta\|_{2}-1=\|\eta\|_{2}\Bigl{(}1-\langle\frac{\eta}{\|\eta\|_{2}} \,,\,\frac{\hat{\eta}}{\|\hat{\eta}\|_{2}}\rangle\Bigr{)}.$ $$

### B.5 Negative log score

$$ $G(\eta)=-\sum_{k=1}^{K}\log\eta_{k},$ $$

$$ $G^{\prime}(\eta)_{k}=-\frac{1}{\eta_{k}},$ $$

$$ $\ell(\eta,i)=\langle-\frac{1}{\eta}\,,\,\eta\rangle+\frac{1}{\eta_{i}}+\sum_{k =1}^{K}\log\eta_{k}=-K+\frac{1}{\eta_{i}}+\sum_{k=1}^{K}\log\eta_{k},$ $$

since constant does not affect optimization, we will have:

$$ $\ell(\eta,i)=\frac{1}{\eta_{k}}+\sum_{k=1}^{K}\log\eta_{k},$ $$

$$ $\text{R}_{\text{Tot}}=\sum_{k=1}^{K}\Bigl{(}-\frac{\hat{\eta}_{k}}{\hat{\eta}_ {k}}+\frac{\eta_{k}}{\hat{\eta}_{k}}+\log\hat{\eta}_{k}\Bigr{)}=\sum_{k=1}^{K} \Bigl{(}\frac{\eta_{k}}{\hat{\eta}_{k}}+\log\hat{\eta}_{k}-1\Bigr{)},$ $$

$$ $\text{R}_{\text{Bayes}}=\sum_{k=1}^{K}\log\eta_{k},$ $$

$$ $\text{R}_{\text{Exc}}=\text{R}_{\text{Tot}}-\text{R}_{\text{Bayes}}=\sum_{k=1} ^{K}\Bigl{(}\frac{\eta_{k}}{\hat{\eta}_{k}}+\log\hat{\eta}_{k}-1-\log\eta_{k} \Bigr{)}=\sum_{k=1}^{K}\Bigl{(}\frac{\eta_{k}}{\hat{\eta}_{k}}-\log\frac{\eta_ {k}}{\hat{\eta}_{k}}-1\Bigr{)}=D_{\text{IS}}[\eta\|\hat{\eta}].$ $$

## Appendix C Approximations

In this section, we provide derivations for different types of Bayesian approximations.
First, let us note, that Bayes risk depends only on the ground truth density (hence has only one argument), while Total and Excess risks are functions of both ground truth density and our approximation (they have two arguments).

Given a set of models (ensemble or samples from a posterior distribution over model parameters), we can use these approximation ideas for both of the arguments.

#### Total risk.

Let us start with Total risk. Since $\text{R}_{\text{Tot}}$ depends linearly on $\eta$, both approximations of the ground truth density lead to the same result:

$$ $\tilde{\text{R}}_{\text{Tot}}(\theta\mid x)=\langle G^{\prime}(\hat{\eta}_{ \theta})\,,\,\hat{\eta}_{\theta}\rangle-G(\hat{\eta}_{\theta})-\langle G^{ \prime}(\hat{\eta}_{\theta})\,,\,\hat{\eta}_{D_{tr}}\rangle,$ (6) $$

where $\hat{\eta}_{D_{tr}}(x)=\mathbb{E}_{p(\tilde{\theta}\mid D_{tr})}\hat{\eta}_{
\tilde{\theta}}(x)$ denotes posterior predictive distribution.

We also have a second argument, for which we also can incorporate this Bayesian reasoning. To do so, we will use an ensemble. Again, two approximation ideas, which lead to the following:

$$ $\tilde{\text{R}}_{\text{Tot}}^{(1)}(x)=\mathbb{E}_{p(\theta\mid D_{tr})}\Bigl{ (}\langle G^{\prime}(\hat{\eta}_{\theta})\,,\,\hat{\eta}_{\theta}\rangle-G( \hat{\eta}_{\theta})-\langle G^{\prime}(\hat{\eta}_{\theta})\,,\,\hat{\eta}_{D _{tr}}\rangle\Bigr{)},$ $$

and

$$ $\tilde{\text{R}}_{\text{Tot}}^{(2)}(x)=\langle G^{\prime}(\hat{\eta}_{D_{tr}}) \,,\,\hat{\eta}_{D_{tr}}\rangle-G(\hat{\eta}_{D_{tr}})-\langle G^{\prime}(\hat {\eta}_{D_{tr}})\,,\,\hat{\eta}_{D_{tr}}\rangle=-G(\hat{\eta}_{D_{tr}}),$ $$

where by superscripts we denote the index of approximation idea.

As we will see below, the second case effectively corresponds to the situation with zero Excess risk (no epistemic uncertainty).

#### Bayes risk.

For Bayes risks, these two approximation ideas lead to the following results:

$$ $\tilde{\text{R}}_{\text{Bayes}}^{(1)}(x)=-\mathbb{E}_{p(\tilde{\theta}\mid D_{ tr})}G(\hat{\eta}_{\tilde{\theta}})\quad\text{and}\quad\tilde{\text{R}}_{\text {Bayes}}^{(2)}(x)=-G(\hat{\eta}_{D_{tr}}).$ $$

However, it is not clear, which of these approximations is better. To investigate it, we assume that there exists a vector of true parameters $\theta^{*}$, for which $\eta(x)=p(y\mid x)=p(y\mid x,\theta^{*})$ for any input point $x$. For example for neural networks, which are flexible enough to represent any function, this is a mild assumption.

Note, that according to equation (4), Bayes risk is concave. Using $g(.)=-\mathbb{E}_{x}G(.)$, the following follows from Jensen’s inequality:

$$ $\mathbb{E}_{p(\theta\mid D_{tr})}g(\hat{\eta}_{\theta})\leq g(\mathbb{E}_{p( \theta\mid D_{tr})}\hat{\eta}_{\theta}).$ $$

At the same time, we know that for Bayes risk the following must hold for any $\theta$:

$$ $g(\eta)=g\bigl{(}p(y\mid x,\theta^{*})\bigr{)}\leq g(\hat{\eta}_{\theta}),$ $$

and in particular:

$$ $g(\eta)\leq\mathbb{E}_{p(\theta\mid D_{tr})}g(\hat{\eta}_{\theta}).$ $$

Hence, we have the following:

$$ $g(\eta)\leq\mathbb{E}_{p(\theta\mid D_{tr})}g(\hat{\eta}_{\theta})\leq g( \mathbb{E}_{p(\theta\mid D_{tr})}\hat{\eta}_{\theta}).$ (7) $$

From equation (7) we see that for estimating Bayes risk, it is beneficial to use the first approximation idea, as it leads to a tighter upper-bound on a true risk, under the assumption that true parameter $\theta^{*}$ belongs to the set of possible parameters of the model.

#### Excess risk.

For Excess risk these two approximation ideas for the ground truth distribution lead to the following results:

$$ $\tilde{\text{R}}_{\text{Exc}}^{(1)}(\theta\mid x)=\mathbb{E}_{p(\tilde{\theta} \mid D_{tr})}D_{G}\Bigl{(}\hat{\eta}_{\tilde{\theta}}~{}\|~{}\hat{\eta}_{ \theta}\Bigr{)}\quad\text{and}\quad\tilde{\text{R}}_{\text{Exc}}^{(2)}(\theta \mid x)=D_{G}\Bigl{(}\hat{\eta}_{D_{tr}}~{}\|~{}\hat{\eta}_{\theta}\Bigr{)}.$ $$

Furthermore, using results of [], we can rewrite the first approximation as follows:

$$ $\tilde{\text{R}}_{\text{Exc}}^{(1)}(\theta\mid x)=D_{G}\Bigl{(}\hat{\eta}_{D_{ tr}}~{}\|~{}\hat{\eta}_{\theta}\Bigr{)}+\mathbb{E}_{p(\tilde{\theta}\mid D_{tr })}D_{G}\Bigl{(}\hat{\eta}_{\tilde{\theta}}~{}\|~{}\hat{\eta}_{D_{tr}}\Bigr{)} =\tilde{\text{R}}_{\text{Exc}}^{(2)}(\theta\mid x)+\mathbb{E}_{p(\tilde{\theta }\mid D_{tr})}D_{G}\Bigl{(}\hat{\eta}_{\tilde{\theta}}~{}\|~{}\hat{\eta}_{D_{ tr}}\Bigr{)}.$ $$

We see that the first approximation contains the second one, and as Bregman divergence is non-negative, $\tilde{\text{R}}_{\text{Exc}}^{(1)}(\theta\mid x)\geq\tilde{\text{R}}_{\text{
Exc}}^{(2)}(\theta\mid x)$ (which also follows from the convexity of Bregman in its first argument). Moreover, the difference between estimates is equal to $\mathbb{E}_{p(\tilde{\theta}\mid D_{tr})}D_{G}\Bigl{(}\hat{\eta}_{\tilde{
\theta}}\|\hat{\eta}_{D_{tr}}\Bigr{)}$, which is known [] as a Bregman Information. A specific case of Bregman information for Log score (see Table 1) is BALD [, ], a well-known epistemic uncertainty measure. We see, that BALD is only a part of the epistemic uncertainty estimate. Worth noting, that in recent work [, ] concerns regarding this expression as a proper measure of epistemic uncertainty were raised.

Furthermore, similarly to the Total risk estimation, we can use ensembles to incorporate the Bayesian approximation idea for the second argument. Thus, we end up with four different estimates of Excess risk:

- •
Expected Pairwise Bregman Divergence (EPBD):
$\tilde{\text{R}}_{\text{Exc}}^{(1,1)}(x)=\mathbb{E}_{p(\tilde{\theta}\mid D_{
tr})}\mathbb{E}_{p(\theta\mid D_{tr})}D_{G}\Bigl{(}\hat{\eta}_{\tilde{\theta}}
~{}\|~{}\hat{\eta}_{\theta}\Bigr{)}.$
Note, that since KL divergence is a special case of Bregman divergence, Expected Pairwise KL (EPKL [, ]) is one of the special cases of this Excess risk estimate.
- •
Bregman Information (BI):
$\tilde{\text{R}}_{\text{Exc}}^{(1,2)}(x)=\mathbb{E}_{p(\tilde{\theta}\mid D_{
tr})}D_{G}\Bigl{(}\hat{\eta}_{\tilde{\theta}}~{}\|~{}\hat{\eta}_{D_{tr}}\Bigr{
)},$
which special case is BALD [, ].
- •
Reverse Bregman Information (RBI):
$\tilde{\text{R}}_{\text{Exc}}^{(2,1)}(x)=\mathbb{E}_{p(\theta\mid D_{tr})}D_{G
}\Bigl{(}\hat{\eta}_{D_{tr}}~{}\|~{}\hat{\eta}_{\theta}\Bigr{)}.$
Its special case for Log score is known as Reverse Mutual Information [].
- •
Finally, we obtain
$\tilde{\text{R}}_{\text{Exc}}^{(2,2)}(x)=D_{G}\Bigl{(}\hat{\eta}_{D_{tr}}~{}\|
~{}\hat{\eta}_{D_{tr}}\Bigr{)}=0,$
which is coherent with the result obtained for the Total risk, when Excess risk (epistemic uncertainty) is equal to 0.

However, it is not clear, what estimate of the Excess risk we should use. Indeed, neither of these estimates
are upper nor lower bounds for the true Excess risk. This is because contrary to Bayes risk, we don’t have any idea if Excess risk with ground truth $\eta$ reaches any extreme.
For another explanation, see Figure 3 and discussion in Section 7.

Figure: Figure 3: Different situations for risk estimates. Risks typed in black and above the axis are the true ones. Risks, typed in color, and below are estimates. Two-pointed arrows show Excess risks. Top. $\tilde{\text{R}}_{\text{Tot}}$ underestimates $\text{R}_{\text{Tot}}$, $\tilde{\text{R}}_{\text{Bayes}}^{(1)}$ better estimates $\text{R}_{\text{Bayes}}$, and $\tilde{\text{R}}_{\text{Exc}}^{(1)}$ better estimates $\text{R}_{\text{Exc}}$. Bottom. $\tilde{\text{R}}_{\text{Tot}}$ overestimates $\text{R}_{\text{Tot}}$, $\tilde{\text{R}}_{\text{Bayes}}^{(1)}$ better estimates $\text{R}_{\text{Bayes}}$, and $\tilde{\text{R}}_{\text{Exc}}^{(2)}$ better estimates $\text{R}_{\text{Exc}}$. We see, that for different estimates of $\text{R}_{\text{Tot}}$, we have different best approximations for $\text{R}_{\text{Exc}}$. See discussion in Section 7.

In Figure 3, for simplicity, we consider only the Bayesian approximation of the first argument (ground-truth probability). In black, we have actual (real risks), while in color we have different estimates of risks. Also, as two-sided arrows, we show the Excess risk.

If we underestimate the Total risk (see top plot in Figure 3), the best choice for Excess risk will be $\tilde{\text{R}}_{\text{Exc}}^{(1)}$, as despite being a lower bound on Excess risk, it is the best we can do ($\tilde{\text{R}}_{\text{Exc}}^{(2)}$ in this case will be even worse).
However, if we overestimate Total risk, then there is no single best choice.
In the bottom plot, when $\tilde{\text{R}}_{\text{Tot}}$ significantly overestimates $\text{R}_{\text{Tot}}$, the second idea for estimating Excess risk gives a better estimate, despite the first idea for Bayes risk still better.

Hence, the best estimate of Excess risk depends on how well we estimate Total risk. But we never know in advance for a particular input $x$, in which regime (overestimated or underestimated Total risk) we are. Thus, there is no best choice among these risks to approximate epistemic uncertainty.

## Appendix D Relations between the estimates

In this section, we discuss how the measures of uncertainty are connected. In the main text, we discussed several ways how one can estimate risk given an ensemble of models, posterior, or samples from it. In what follows, we show how one can further decompose these estimates of Excess risk.

Let us start with $\tilde{\text{R}}_{\text{Exc}}^{(1,1)}(x)$. Using results of [], we have:

$$ $\tilde{\text{R}}_{\text{Exc}}^{(1,1)}(x)=\mathbb{E}_{p(\theta\mid D_{tr})} \mathbb{E}_{p(\tilde{\theta}\mid D_{tr})}D_{G}\Bigl{(}\hat{\eta}_{\tilde{ \theta}}\|\hat{\eta}_{\theta}\Bigr{)}=\\ \mathbb{E}_{p(\theta\mid D_{tr})}D_{G}\Bigl{(}\hat{\eta}_{D_{tr}}\|\hat{\eta}_ {\theta}\Bigr{)}+\mathbb{E}_{p(\tilde{\theta}\mid D_{tr})}D_{G}\Bigl{(}\hat{ \eta}_{\tilde{\theta}}\|\hat{\eta}_{D_{tr}}\Bigr{)}=\tilde{\text{R}}_{\text{ Exc}}^{(2,1)}(x)+\tilde{\text{R}}_{\text{Exc}}^{(1,2)}(x).$ $$

Since all of these estimates are non-negative, the following holds true:

$$ $\tilde{\text{R}}_{\text{Exc}}^{(1,1)}(x)\geq\tilde{\text{R}}_{\text{Exc}}^{(2, 1)}(x)\geq\tilde{\text{R}}_{\text{Exc}}^{(2,2)}(x)=0,$ $$

and

$$ $\tilde{\text{R}}_{\text{Exc}}^{(1,1)}(x)\geq\tilde{\text{R}}_{\text{Exc}}^{(1, 2)}(x)\geq\tilde{\text{R}}_{\text{Exc}}^{(2,2)}(x)=0$ $$

for any $x$.

Moreover, one can show that the following holds:

$$ $\tilde{\text{R}}_{\text{Tot}}^{(1)}(x)=\tilde{\text{R}}_{\text{Bayes}}^{(1)}(x )+\tilde{\text{R}}_{\text{Exc}}^{(1,1)}(x)=\tilde{\text{R}}_{\text{Bayes}}^{(2 )}(x)+\tilde{\text{R}}_{\text{Exc}}^{(2,1)}(x),$ $$

and

$$ $\tilde{\text{R}}_{\text{Tot}}^{(2)}(x)=\tilde{\text{R}}_{\text{Bayes}}^{(2)}(x )+\tilde{\text{R}}_{\text{Exc}}^{(2,2)}(x)=\tilde{\text{R}}_{\text{Bayes}}^{(1 )}(x)+\tilde{\text{R}}_{\text{Exc}}^{(1,2)}(x).$ $$

Additionally, Bregman information can be received as follows:

$$ $BI(x)=\tilde{\text{R}}_{\text{Exc}}^{(1,1)}(x)-\tilde{\text{R}}_{\text{Exc}}^{ (2,1)}(x)=\tilde{\text{R}}_{\text{Exc}}^{(1,2)}(x)-\tilde{\text{R}}_{\text{Exc }}^{(2,2)}(x)=\tilde{\text{R}}_{\text{Bayes}}^{(2)}(x)-\tilde{\text{R}}_{\text {Bayes}}^{(1)}(x).$ $$

Reverse Bregman Information:

$$ $RBI(x)=\tilde{\text{R}}_{\text{Exc}}^{(2,1)}(x)-\tilde{\text{R}}_{\text{Exc}}^ {(2,2)}(x)=\tilde{\text{R}}_{\text{Exc}}^{(1,1)}(x)-\tilde{\text{R}}_{\text{ Exc}}^{(1,2)}(x)=\tilde{\text{R}}_{\text{Tot}}^{(1)}(x)-\tilde{\text{R}}_{ \text{Tot}}^{(2)}(x).$ $$

## Appendix E Hand-crafted datasets

In this section, we describe the noisy versions of CIFAR10 and CIFAR100 datasets created for our experiments. We created three noisy datasets, each discussed below.

### E.1 Noisy labels datasets

In the dataset, the images are the same as in the original dataset (covariates are not changed). However, some of the labels are randomly swapped. Hence, only labels were changed, while covariates were kept as in the original dataset.
The motivation for the creation of this dataset is due to the fact that conventional image classification datasets essentially contain no aleatoric uncertainty [].
To mitigate the limitation, which is critical for our evaluation, we introduce the label noise manually. By nature, this noise is aleatoric.

#### CIFAR10.

We decide to do the following pairs of labels that are randomly swapped: 1 to 7, 7 to 1, 3 to 8, 8 to 3, 2 to 5, and 5 to 2.

#### CIFAR100.

We decided to randomly swap the following pairs of labels: 1 to 7, 7 to 1, 3 to 8, 8 to 3, 2 to 5, 5 to 2, 10 to 20, 20 to 10, 40 to 50, 50 to 40, 90 to 99, 99 to 90, 25 to 75, 75 to 25, 17 to 71, 71 to 17, 13 to 31, 31 to 13, and 24 to 42, 42 to 24.

### E.2 Blurred datasets

When predicting by a model trained to particular data, on some another dataset, where covariates are drastically different (“hard-OOD”), predictions are not meaningful anymore.

To introduce “soft-OOD” datasets, where labels remain the same but covariates are altered (yet the predicted vectors are still reasonable), we applied a Gaussian blur to the images in CIFAR10 and CIFAR100.
Specifically, before the same transformations that we did for standard validation splits, we did Gaussian blur with kernel size of $(3,3)$ and sigma of $(0.1,2.0)$.
These blurred datasets help model “soft-OOD” scenarios.

### E.3 Missing class dataset

Essentially, Excess risk-based uncertainty measures evaluate disagreement between models in an ensemble.
It is interesting to study this disagreement in the case when some of the classes are missing for some members within the ensemble.
For this, we consider a special version of the CIFAR10 dataset, when we totally ignore some classes for some members of the ensemble. It results in an increase disagreement between ensemble members.

In our experiments, we had overall 20 ensemble members. For members 1 and 2 class 0 was missed. For members 3 and 4 class 1 was missed. And for members 5 and 6 class 2 was missed. All other members of the ensemble had all the classes.

## Appendix F Training details

Training procedures for each dataset were similar. We used either ResNet18 or VGG19 architectures.

For CIFAR10-based datasets, we used code from this repository: [https://github.com/kuangliu/pytorch-cifar](https://github.com/kuangliu/pytorch-cifar). The training procedure consisted of 200 epochs with a cosine annealing learning rate. For an optimizer, we use SGD with momentum and weight decay. For more details see the code.

In Figure 4 we present performance summary statistics of the ensembles of different architectures. Specifically, we show accuracy, macro averaged precision, recall, and F1-score. In the left figure, the distribution for ResNet18, trained with different loss functions. In the right figure, VGG19.

For CIFAR100-based datasets, we used code from this repository: [https://github.com/weiaicunzai/pytorch-cifar100](https://github.com/weiaicunzai/pytorch-cifar100). The training procedure consisted of 200 epochs with learning rate decay at particular milestones: [60, 120, 160]. For an optimizer, we use SGD with momentum and weight decay. For more details see the code.

Similarly to CIFAR10, in Figure 5 we present performance summary statistics of the ensembles of different architectures. In the left figure, the distribution for ResNet18, trained with different loss functions. In the right figure, VGG19.

Figure: Figure 4: Violin plots for different training loss functions and different metrics. The training dataset is CIFAR10. Left: ResNet18. Right: VGG-19.
Refer to caption: x3.png

Figure: Figure 5: Violin plots for different training loss functions and different metrics. The training dataset is CIFAR100. Left: ResNet18. Right: VGG-19.
Refer to caption: x5.png

## Appendix G Additional experiments on matching / not-matching proper scoring rules

Figure: Figure 6: AUROC for out-of-distribution detection. Left: When scoring rules, used for loss function and risks computation, match. Right: When they are not matching. All proper scoring rules are considered.
Refer to caption: x7.png

Figure: Figure 7: AUROC for out-of-distribution detection. Left: When scoring rules, used for loss function and risks computation, match. Right: When they are not matching. Neglog proper scoring rule excluded from consideration.
Refer to caption: x8.png

In this section, we provide additional results on the matching and non-matching proper scoring rules used for loss function and risk (uncertainty measures) computations.

Figure 6 displays a histogram of AUROC scores for out-of-distribution detection, comparing the matching and non-matching cases. For the matching case, the results are meaningful, showing a significant margin from an AUROC score of 0.5, which corresponds to a constant predictor. In contrast, the non-matching case includes values less than 0.5, indicating a drawback in combining different loss functions and uncertainty measures.

From Figure 2 in the main text, we see that the most unstable scoring rule is Neglog. One might think this instability is due to its computational issues, and excluding it might equalize the results for matching and non-matching cases. To test this, we plot an additional figure (Figure 7) excluding the Neglog scoring rule.

However, even after excluding Neglog, we still observe noise in the results, particularly from combinations of the Spherical loss function with other scoring rules for risk computations. This demonstrates that the effect of matching and non-matching scoring rules persists beyond the instability of any single rule.

## Appendix H Additional experiments on out-of-distribution detection

In this section, we provide an additional comparison of matching and not-matching results for out-of-distribution detection.
For this, we add Table 4 and compare columns “Matching” and “Not-Matching” in this table element-wise. Column “Matching” corresponds to matching proper scoring rule used for loss function and uncertainty measures. Column “Not-Matching” corresponds to different ones.
We see, that results in the left part of Table 4, except two values (in red), are systematically better, than in its right part. However, those two values are very close to each other.

**Table 4: AUROC for OOD detection. Left (Matching): For computation of OOD measures, we used loss and corresponding risks, generated by the matching function $G$. Right (Not-matching): Loss and corresponding risks generated by not-matching functions $G$. The best results (element-wise, between Matching and Not-matching) are in bold. In red are those where Different is better. By asterisk (*) we denote “soft-OOD”.**
| Dataset | Matching | Not-Matching |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
|  |  | Bayes | Excess | Total | Bayes | Excess | Total |
| InD | OOD |  |  |  |  |  |  |
| CIFAR10 | Blurred CIFAR10(*) | 84.38 | 87.80 | 85.90 | 83.91 | 86.59 | 86.00 |
| Blurred CIFAR100 | 94.48 | 95.65 | 95.42 | 94.25 | 94.95 | 95.34 |  |
| CIFAR100 | 91.05 | 90.08 | 90.87 | 90.96 | 88.21 | 90.77 |  |
| SVHN | 94.54 | 93.31 | 94.44 | 94.46 | 91.90 | 94.30 |  |
| CIFAR100 | Blurred CIFAR10 | 87.96 | 85.36 | 90.32 | 87.65 | 76.68 | 87.96 |
| Blurred CIFAR100(*) | 71.40 | 77.55 | 74.15 | 70.99 | 72.83 | 73.55 |  |
| CIFAR10 | 79.35 | 72.70 | 79.27 | 78.87 | 64.19 | 76.64 |  |
| SVHN | 84.90 | 73.99 | 84.59 | 84.91 | 65.46 | 82.12 |  |

## Appendix I Additional experiments misclassification detection

Similarly to the previous section with out-of-distribution detection, we compare columns “Matching” and “Not-Matching” in Table 5 element-wise.
Column “Matching” corresponds to matching proper scoring rule used for loss function and uncertainty measures. Column “Not-Matching” corresponds to different ones.
We see, that results in the left part of Table 5, are systematically better, than in its right part.

**Table 5: AUROC for misclassification detection. Left (Matching): For computation of OOD measures, we used loss and corresponding risks, generated by the matching function $G$. Right (Not-Matching): Loss and corresponding risks generated by not-matching functions $G$. The best results (element-wise, between Matching and Not-Matching) are in bold.**
| Dataset | Matching | Not-Matching |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
|  | Bayes | Excess | Total | Bayes | Excess | Total |
| CIFAR10 | 94.53 | 94.65 | 94.78 | 94.30 | 92.72 | 94.39 |
| CIFAR100 | 86.47 | 82.90 | 86.83 | 85.57 | 71.62 | 83.13 |
| Missed class CIFAR10 | 93.73 | 83.23 | 91.14 | 93.55 | 79.71 | 89.75 |
| Noisy CIFAR10 | 81.00 | 74.35 | 80.97 | 79.49 | 70.17 | 78.52 |
| Noisy CIFAR100 | 82.64 | 72.30 | 82.45 | 81.49 | 60.23 | 78.19 |

## Appendix J Other approximations

In this section, we discuss choices of Bayesian approximation strategy (Inner or Outer) separately for different problems. Outer in this notation means the first approach of the Bayesian approximation, when we perform Bayesian averaging of risk, and effectively apply an outer expectation. Inner corresponds to the second approach of Bayesian approximation, namely Bayesian model averaging when we first find the expectation and then plug it in the risk. Effectively we do inner expectation in this case.

### J.1 Out-of-distribution detection

Here, we extend the results presented in the main part, and demonstrate, how the approximation strategy of risks influences the results of out-of-distribution detection. We present results in Table 6, where matching scoring rules were used for loss function and risks computations, and Table 7, where they are different.

We see, that results in Table 6 (matching scoring rules) are systematically better, than results in Table 7, when there was no matching.

#### Bayes risk.

We see, that there is no the only leader of specific approximation. Nevertheless, in most cases and on average, Inner approximations seem slightly better. Average values for matching case: Bayes(O) - $85.47\pm 8.12$, Bayes(I) - $86.54\pm 7.69$. Average values for not matching case: Bayes(O) - $85.09\pm 8.32$, Bayes(I) - $86.41\pm 7.72$. In both cases, the Inner approximation is slightly (on average) better, than the Outer.

#### Total risk.

Similarly to Bayes risk, we see that measures are very close to each other. Average values for matching case: Total(O) - $87.20\pm 7.17$, Total(I) - $86.54\pm 7.69$. Average values for not matching case: Total(O) - $85.26\pm 8.37$, Total(I) - $86.41\pm 7.72$.

#### Excess risk.

In these Tables we have three out of four different approximations of Excess risk: Bregman Information (BI), Reverse Bregman Information (RBI), and Expected Pairwise Bregman Divergence (EPBD). We do not consider Inner Inner approximation, as it is zero.
As in the previous cases, there is no sole leader in these measures.

**Table 6: AUROC for out-of-distribution detection, when matching scoring rules were used for loss/risks. Here we extend different approximations. Notation: O - Outer, I - Inner. (R)BI - (Reverse) Bregman Information, EPBD - Expected Pairwise Bregman Divergence. Best results in bold, second-best underline. By asterisk (*) we denote “soft-OOD”.**
| Dataset | Metrics |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
|  |  | Bayes(O) | Bayes(I) | Total(O) | Total(I) | BI | RBI | EPBD |
| InD | OOD |  |  |  |  |  |  |  |
| CIFAR10 | Blurred CIFAR10(*) | 83.26 | 85.49 | 86.30 | 85.49 | 87.63 | 87.93 | 87.84 |
| Blurred CIFAR100 | 93.75 | 95.22 | 95.62 | 95.22 | 95.60 | 95.68 | 95.66 |  |
| CIFAR100 | 91.11 | 90.99 | 90.75 | 90.99 | 90.20 | 89.96 | 90.07 |  |
| SVHN | 94.55 | 94.54 | 94.34 | 94.54 | 93.39 | 93.23 | 93.31 |  |
| CIFAR100 | Blurred CIFAR10 | 86.74 | 89.18 | 91.45 | 89.18 | 85.83 | 84.48 | 85.76 |
| Blurred CIFAR100(*) | 70.18 | 72.62 | 75.68 | 72.62 | 76.76 | 78.03 | 77.87 |  |
| CIFAR10 | 79.25 | 79.44 | 79.10 | 79.44 | 73.49 | 71.82 | 72.78 |  |
| SVHN | 84.95 | 84.85 | 84.33 | 84.85 | 75.07 | 72.80 | 74.11 |  |

**Table 7: AUROC for out-of-distribution detection, when not-matching scoring rules were used for loss/risks. Notation: O - Outer, I - Inner. (R)BI - (Reverse) Bregman Information, EPBD - Expected Pairwise Bregman Divergence. Best results in bold, second-best underline. By asterisk (*) we denote “soft-OOD”.**
| Dataset | Metrics |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
|  |  | Bayes(O) | Bayes(I) | Total(O) | Total(I) | BI | RBI | EPBD |
| InD | OOD |  |  |  |  |  |  |  |
| CIFAR10 | Blurred CIFAR10(*) | 82.56 | 85.26 | 86.74 | 85.26 | 86.57 | 86.46 | 86.73 |
| Blurred CIFAR100 | 93.45 | 95.05 | 95.64 | 95.05 | 95.00 | 94.71 | 95.12 |  |
| CIFAR100 | 90.92 | 90.99 | 90.55 | 90.99 | 88.34 | 88.04 | 88.25 |  |
| SVHN | 94.41 | 94.51 | 94.09 | 94.51 | 91.94 | 91.75 | 92.00 |  |
| CIFAR100 | Blurred CIFAR10 | 86.36 | 88.94 | 86.98 | 88.94 | 76.98 | 75.04 | 78.02 |
| Blurred CIFAR100(*) | 69.42 | 72.56 | 74.54 | 72.56 | 71.87 | 72.99 | 73.63 |  |
| CIFAR10 | 78.71 | 79.03 | 74.26 | 79.03 | 64.67 | 63.30 | 64.61 |  |
| SVHN | 84.87 | 84.95 | 79.29 | 84.95 | 66.20 | 64.34 | 65.84 |  |

### J.2 Misclassification detection

**Table 8: AUROC for misclassification detection, when matching scoring rules were used for loss/risks. Notation: O - Outer, I - Inner. (R)BI - (Reverse) Bregman Information, EPBD - Expected Pairwise Bregman Divergence. Best results in bold, second-best underline.**
| Dataset | Metrics |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
|  | Bayes(O) | Bayes(I) | Total(O) | Total(I) | BI | RBI | EPBD |
| InD |  |  |  |  |  |  |  |
| CIFAR10 | 94.30 | 94.76 | 94.79 | 94.76 | 94.68 | 94.60 | 94.65 |
| CIFAR100 | 86.12 | 86.81 | 86.86 | 86.81 | 83.74 | 81.92 | 83.04 |
| Missed class CIFAR10 | 94.47 | 92.99 | 89.30 | 92.99 | 86.34 | 80.86 | 82.49 |
| Noisy CIFAR10 | 80.57 | 81.42 | 80.53 | 81.42 | 74.77 | 73.98 | 74.31 |
| Noisy CIFAR100 | 82.66 | 82.62 | 82.28 | 82.62 | 73.28 | 71.25 | 72.37 |

**Table 9: AUROC for misclassification detection, when not-matching scoring rules were used for loss/risks. Notation: O - Outer, I - Inner. (R)BI - (Reverse) Bregman Information, EPBD - Expected Pairwise Bregman Divergence. Best results in bold, second-best underline.**
| Dataset | Metrics |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
|  | Bayes(O) | Bayes(I) | Total(O) | Total(I) | BI | RBI | EPBD |
| InD |  |  |  |  |  |  |  |
| CIFAR10 | 94.11 | 94.50 | 94.29 | 94.50 | 92.53 | 92.59 | 93.04 |
| CIFAR100 | 85.19 | 85.96 | 80.30 | 85.96 | 72.45 | 70.00 | 72.40 |
| Missed class CIFAR10 | 94.28 | 92.83 | 86.67 | 92.83 | 81.24 | 77.62 | 80.26 |
| Noisy CIFAR10 | 78.52 | 80.45 | 76.59 | 80.45 | 71.02 | 69.18 | 70.33 |
| Noisy CIFAR100 | 81.44 | 81.54 | 74.85 | 81.54 | 61.37 | 58.88 | 60.45 |

Similar to the previous section, here we demonstrate extended results of misclassification detection. We present results in Table 8, where matching scoring rules were used for loss function and risks computations, and Table 9, where they are different.

We see, that results in Table 8 (matching scoring rules) are systematically better than results in Table 9, when there was no matching.

#### Bayes risk.

As before, there is no sole leader. Average values for matching case: Bayes(O) - $87.62\pm 6.48$, Bayes(I) - $87.72\pm 5.99$. Average values for not matching case: Bayes(O) - $86.71\pm 7.23$, Bayes(I) - $87.06\pm 6.40$.

#### Total risk.

Similarly to Bayes risk, we see that measures are very close to each other. Average values for matching case: Total(O) - $86.75\pm 5.70$, Total(I) - $87.72\pm 5.99$. Average values for not matching case: Total(O) - $82.54\pm 7.97$, Total(I) - $87.06\pm 6.40$.

#### Excess risk.

In these Tables we have three out of four different approximations of Excess risk: Bregman Information (BI), Reverse Bregman Information (RBI), and Expected Pairwise Bregman Divergence (EPBD). We do not consider Inner Inner approximation, as it is zero.
As in the previous cases, there is no sole leader in these measures.

## Peer Reviews

confidence: 4
contribution: 2
initial_rating: 6
presentation: 3
questions: Does the loss function to quantify uncertainty and the training loss function need to be the same?
soundness: 3
strengths: 1. The paper is well written and clear.
2. The paper presents a solid theoretical contribution by unifying different predictive uncertainty measures under a Bayesian risk decomposition framework. It connects well-known uncertainty quantification methods (e.g., Mutual Information, Expected Pairwise KL Divergence) with a common theoretical foundation, which adds clarity and depth to the topic.
summary: The authors introduce a framework for quantifying uncertainty by decomposing it into aleatoric and epistemic. The authors use Bayesian methods to approximate and derive a unified framework for generating uncertainty measures. The framework is validated through experiments on classification tasks for image datasets, specifically on out-of-distribution detection.
weaknesses: ### 1. Limited Scope of Experimental Section

The paper's experimental section only considers image classification tasks, which have been extensively researched in the uncertainty community. It could be strengthened by:

   - **Broadening the task domain**: The paper could provide results on regression tasks to bolster the experimental validation.
   - **Exploring state-of-the-art methods**: Consideration of more cutting-edge methods, such as generative models for uncertainty quantification, could enhance the experimental insights.

### 2. Redundant Conclusions

Given the lack of novelty in experimental design (see 1), the conclusions drawn in the experimental section are similar to those in previous works [1, 2], which limits the novelty of the paper’s contributions to the literature.

### 3. Assumption of Well-Approximated Data Distributions

The framework relies on the decomposition of total risk into Bayes risk and excess risk, which assumes that the underlying true data distribution can be well approximated. In practice, this assumption may not hold in many real-world scenarios, especially with complex, high-dimensional data.

### 4. Lack of Baseline Comparisons

The paper appears to lack comparison to strong baselines. While the authors state:

> "We emphasize that the goal of our experimental evaluation is not to provide new state-of-the-art measures or compete with other known approaches for uncertainty quantification."

They also mention:

> "Instead, we aim to verify whether different uncertainty estimates are indeed related to specific types of uncertainty."

However, the paper fails to provide comparisons to modern estimates of uncertainty such as [3, 4], which could help contextualize their findings and strengthen the evaluation.

### 5. Lack of training details

The authors appear to have omitted important training details in Appendix H. Specifically, it is unclear:

   - What loss function was used to train the models?
   - How were the ensembles trained? Were they trained as completely independent networks, or did they share components?
   
Providing these details is crucial for reproducibility and understanding how the proposed framework was implemented. 

[1] Lisa Wimmer, Yusuf Sale, Paul Hofman, Bernd Bischl, and Eyke Hüllermeier. Quantifying aleatoric and epistemic uncertainty in machine learning: Are conditional entropy and mutual information appropriate measures? In Uncertainty in Artificial Intelligence, pp. 2282–2292. PMLR, 2023.

[2] Kajetan Schweighofer, Lukas Aichberger, Mykyta Ielanskyi, and Sepp Hochreiter. Introducing an improved information-theoretic measure of predictive uncertainty. In NeurIPS 2023 Workshop on Mathematics of Modern Machine Learning, 2023a.

[3] Berry, Lucas, and David Meger. "Escaping the sample trap: Fast and accurate epistemic uncertainty estimation with pairwise-distance estimators." arXiv preprint arXiv:2308.13498 (2023).

[4] Chan, Matthew A., Maria J. Molina, and Christopher A. Metzler. "Hyper-Diffusion: Estimating Epistemic and Aleatoric Uncertainty with a Single Model." arXiv preprint arXiv:2402.03478 (2024).

---

confidence: 3
contribution: 3
initial_rating: 3
presentation: 2
questions: - Previous work by Hofman et al [1] seems to be related and at least partially overlapping, but not cited. For parts of Table 1 it seems Hofman et al. give a similar result also based on proper scoring rules. From this it seems that a general framework for uncertainty measures already exists. Can the authors clarify how their proposed framework extends beyond this?
soundness: 3
strengths: - The paper clearly outlines its contribution. By offering a better theoretical understanding of the commonly used uncertainty measures we may progress the field of disentanglement. 
- The paper covers a lot of ground in a limited span, discussing risk, proper scoring rules, different ways for risk estimation, and a substantial amount of experimental results. Overall I think the paper provides a nice overview of different uncertainty measures and how they relate.
summary: This work proposes a generalized framework from which common measures of aleatoric and epistemic uncertainty can be obtained. This is done through Proper Scoring rules and the notion of risk. The framework assumes Bayes (aleatoric) and Excess (epistemic) risk, and explains that the risk may be estimated differently with different ways to approximate the true function and the learned function. Following this they observe which proper scoring rule tends to perform well, and when aleatoric/epistemic uncertainty performs well for a certain task. Lastly, they briefly describe energy based measures.
weaknesses: - While the paper unifies various results into a shared formulation, parts of this are not entirely novel and the paper is not clear about this. For example, Schweighofer et al. (2023a)[2] already describe EPKL as a deviation from Mutual Information that does not assume the BMA to be the true model. They also discuss the relation to the reverse Mutual Information. This disagrees with the problem statement on Line 45 which suggests that it is not clear how these measures relate to each other. Similarly, results similar to Table 1 are already given by Hofman et al. [1] (see questions). Consider explicitly showing which parts of the generalization are novel, and which relationships are established (for example by [1] and [2]). 
- The current work fails to assert the usefulness of the proposed generalization. I would expect a strong evaluation to create hypotheses that follow from the generalization, and validate those experimentally. Only experiments 6.2 and 6.3 come with a hypothesis, but those hypotheses generally apply to uncertainty quantification and not the proposed generalization. This severely limits the impact of the paper. 
- At various locations the authors discuss that aleatoric and/or epistemic uncertainty are vaguely defined, but they do not try to maintain a precise definition following the literature. For example, they argue that epistemic uncertainty is the lack of knowledge of the right model parameters, but this would ignore model misspecification, which is accepted as a source of epistemic uncertainty. Similarly, on Line 36 authors say that aleatoric uncertainty is ambiguity in the label distribution, which ignores uncertainty in the inputs or an otherwise stochastic relationship between the features and the labels. I encourage the authors to attempt to use a more consistent and complete definition of aleatoric and epistemic uncertainty as a starting point. This is particularly relevant because the Pointwise Risk perspective seems to try to give an alternative precise definition. Consider for a source [3], Section 2.4.1.
- It is unclear why the energy-based models are discussed, as they seem to have little relevance. Please clarify the relevance or remove this section. 

[1] Hofman, Paul, Yusuf Sale, and Eyke Hüllermeier. "Quantifying Aleatoric and Epistemic Uncertainty with Proper Scoring Rules." arXiv preprint arXiv:2404.12215 (2024).

[2] Schweighofer, Kajetan, et al. "Introducing an improved information-theoretic measure of predictive uncertainty." arXiv preprint arXiv:2311.08309 (2023).

[3] Gawlikowski, Jakob, et al. "A survey of uncertainty in deep neural networks." Artificial Intelligence Review 56.Suppl 1 (2023): 1513-1589.


## Additional Feedback

- In Section 6.4 it would be good to clearly point to where we can find evidence for which claim (table, row and column). This mainly applies to Lines 477-482. I cannot find the results that show R_exc(3,1) is better than both energy-based methods for misclassification detection, nor that R_Exc(3,1) is preferred over energy based measures for Soft-OOD. 
- Line 456 seems overstated “all instances of excess risk should perform worse [than Bayes/Total risk on misclassification detection]”. This is true if there is more (separable) aleatoric uncertainty than epistemic uncertainty, but this is not true in general. For example in low data or high dimensional problems, this might not hold. Adding the word “typically” or “usually” could be sufficient. 
- Lines 104-107 are repetitive with Lines 36-38. 
- The whole paper assumes Deep Ensembles as the BNN, but different behavior may be observed with different models. It could be good to show behavior with MC-Dropout or Flipout.
- Table 5 mentioned on Line 475 is actually in the appendix, but the text presents it as part of the main body. 
- In the tables it should be clear whether the plus-minus indicates standard deviation, variance or standard error. If appropriate, it may be helpful to indicate the which parts of the tables relate to conclusions drawn (highlighting in bold may be useful). 
- The notation of e.g. R_Exc^{(1, 3)} is hard to keep track of as a reader. Would it be acceptable to rename “Excess” risk to epistemic risk, or Bayes risk to Aleatoric Risk? Perhaps the indices may also be substituted with abbreviations so the connection to the approximations is clear?

---

confidence: 4
contribution: 2
initial_rating: 6
presentation: 3
questions: 1. In Section 4.1 and Appendix E, the authors arrive at the conclusion that choosing the best estimate is often impossible in practice. namely, in Section 4.1, the authors say that exact relationship of the central estimate, $r(\bar\eta)$ with the other ones is not known so it's not clear which choice of the estimate for Bayes risk is best; while in Appendix E, the authors conclude that knowing which estimate to choose for the Excess is impossible to know apriori. Similarly, there is little guidance on the choice of the proper scoring rules. Overall, this leaves me with a 4 (proper scoring rules) * 9 (estimates) possible ways to get the Excess risk. Similarly, for the Bayes risk, we have another 12 possible choices. Are there any general or maybe domain-specific advice on how to choose the best UQ measure from among the proposed ones? Is it possible to have results on the error rate of each estimate for some common distribution families? In Appendix E, the authors note that none of the estimated yield a lower / upper on the Excess risk, which raises a question if it's possible to derive such an estimated bound? 
2. I think there are important points missing from the experiments description (Section 6). For example, how are the UQ measures computed given the outputs of the deep ensemble model? And more generally, given a model that only allows access samples from the posterior, are we resorting to a regular Monte Carlo? 
3. In Section 6, what is meant by 5 groups of ensembles? Do all of them have the same architecture? I think the wording here is confusing.
soundness: 3
strengths: Many parts of the work have appeared in some form before, but combining them is a novel idea. For example, generating the uncertainty measure from the point-wise risks has been explored in [1] and [2] as the authors note, but also in [3]. Proper scoring rules were explored in the context of the uncertainty quantification in [4]. Finally, the various Bayesian risk estimation techniques have existed in the literature for a long time. However, the authors do a good job connecting these pieces and showing how various uncertainty measures naturally arise and correspond to different ways of estimating the risk for a proper scoring rule. The authors supplement this with a deeper investigation of the relationships between the estimates and exploring which estimates are better under specific conditions. 

[1] Kotelevskii, Nikita, et al. "Nonparametric uncertainty quantification for single deterministic neural network." Advances in Neural Information Processing Systems 35 (2022): 36308-36323.
[2] Lahlou, Salem, et al. "Deup: Direct epistemic uncertainty prediction." Transactions on Machine Learning (2021).
[3] Liu, Jeremiah, et al. "Accurate uncertainty estimation and decomposition in ensemble learning." Advances in neural information processing systems 32 (2019).
[4] Gruber, Sebastian, and Florian Buettner. "Better uncertainty calibration via proper scores for classification and beyond." Advances in Neural Information Processing Systems 35 (2022): 8618-8632.
summary: The authors propose a family of uncertainty measures based on point-wise risks which allows to decompose the uncertainty into aleatoric (Bayes risk) and epistemic (Excess risk) parts. Plugging-in proper scoring rules into the derived uncertainty measures, they obtain expressions for computing the Bayes and Excess risk for the specific case of proper scoring rules. Finally, the authors compare three different methods for estimating the risks based on the Bayesian formulation, which they allows to derive many of the existing uncertainty measures as special cases.
weaknesses: While the work as a whole appears sound, I have a few concerns:
1. How are the proposed risks affected by the model misspecification, e.g., prior misspecification of $p(\theta)$? I think since the method is Bayesian in nature, it's important to outline the assumptions and highlight possible shortcomings.  
2. No simulations. Assuming, we know the true $\eta$, it would be interesting to see how the different estimators of the risk fare under (1) various distribution shapes (2) misspecification (of prior) (3) error from approximate posterior (if full posterior is not available). 
3. Experimental section is narrowly focused and not well-motivated. The authors devote their experiments to testing whether the aleotoric and epistemic uncertainties are captured well. For this, the authors compute the proposed Total, Bayes, and Excess risks and classify the samples into out-of-distribution and misclassified based on these values. They then test the accuracy of this classification. Since Excess risk is connected to the epistemic uncertainty that is connected to the out-of-distribution classification, the out-of-distribution classification accuracy must be better based on the Excess risk. Similarly for the Bayes risk and the accuracy of identifying misclassification, both of which are connected to the aleatoric uncertainty. First, these experiments hinge on the assumption that indeed the misclassification and out-of-distribution are related to the aleatoric and epistemic uncertainties -- a largely untestable assumption. Second, from the tables, I see very little difference between using the Total, Bayes, and Excess risks across all datasets and tasks: the differences while being statistically significant appear almost negligible, which raises questions whether the suggested measures and/or experiments are meaningful. 
4. No comparison with other UQ measures. The authors do not compare their proposed UQ measures with the existing approaches, which leaves the question of why they should be used in practice. 
5. (Minor gripe)  Limited practical utility. It appears to compute any of the proposed uncertainty measures, one needs an access to the posterior $p(\theta|X,Y)$. Ultimately, this limits the set of methods to which the proposed approach could be applied.

---

confidence: 4
contribution: 3
initial_rating: 6
presentation: 3
questions: See Weaknesses. The authors should cite https://arxiv.org/abs/2302.09656 and https://link.springer.com/chapter/10.1007/978-3-031-57963-9_1#:~:text=In%20their%20seminal%201990%20paper,bound%20to%20hold%20with%20equality when discussing about the mentioned problem (and possibly in the related work section). They may also cite other approaches that may be considered in the future, such as credal sets ones, studied by Yusuf Sale, Eyke Hülleremeier, Paul Hofman, Michele Caprio, Viktor Bengs, Sebastien Desterke, Fabio Cuzzolin, Thierry Denoeux, Alessio Benavoli, and Cassio de Campos.

Also, I think there's a typo in line 198: shouldn't it be $\eta_{\theta \mid D_{tr}}$ instead of $\eta_{\theta}\mid D_{tr}$?
soundness: 3
strengths: This is a nice and interesting paper that addresses a cogent problem in the literature, that is, the existence of many aleatoric and epistemic uncertainty measures based on the total risk decomposition, and how they're related to one another.
summary: The authors use a decomposition of statistical pointwise risk into components, associated with aleatoric and epistemic uncertainties. Together with Bayesian methods, applied as an approximation, they build a framework that allows to generate different predictive uncertainty measures. Experiments are shown that support the theoretical claims.
weaknesses: Taking a Bayesian route has a fundamental drawback, that was highlighted e.g. by Hullermeier and Waegeman (2021, already cited in the paper) and Caprio et al. (2024, Credal Bayesian Deep Learning). Consider the *posterior predictive distribution*,

$$p(\tilde y \mid \tilde x , D)=\int_\Theta p(\tilde y \mid \tilde x, \theta) p(\theta \mid D) \text{d}\theta = \mathbb{E}_{\theta \sim p(\theta \mid D)} [p(\tilde y \mid \tilde x, \theta)],$$

where $p(\tilde y \mid \tilde x, \theta)$ is the model distribution, and $p(\theta \mid D)$ is the parameter posterior. Posterior predictive $p(\tilde y \mid \tilde x , D)$ tells us "how likely" output $\tilde y$ is to be the "correct one" for input $\tilde x$, given the knowledge encapsulated in the data $D$ we collected, which enters the computation via the posterior probability $p(\theta \mid D)$. Oftentimes, scholars claim that, in a Bayesian setting, the distribution on the parameters $\theta$ captures (or is linked to) the epistemic uncertainty (EU) faced by the agent. This is a somehow agreeable premise, akin to a second-order distribution reasoning. If we accept this assertion, though, we see how EU at the predictive level is not quantifiable any more, since it gets washed away by taking the expectation $\mathbb{E}_{\theta \sim p(\theta \mid D)} [\cdot ]$. 

This conceptual problem is relevant for this paper, especially because it is related to the ideas of Bayesian averaging of risk and Central label. I'd like the authors to add a discussion on this matter.

Meta-review: This study provides a novel and unified perspective on evaluating predictive uncertainty in classification problems, specifically addressing aleatoric and epistemic uncertainty. It proposes a systematic decomposition method for total loss based on proper scoring rules, enabling a unified re-derivation of various estimators for aleatoric and epistemic uncertainty found in existing studies. One weakness of this study is that, while it unifies various estimators, it offers limited insights into which estimators are most effective. Despite this limitation, the study makes significant contributions by advancing a unified and Bayesian perspective on uncertainty evaluation. It provides new insights into aleatoric and epistemic uncertainty through numerical experiments, offering important implications for addressing real-world problems in uncertainty evaluation. For these reasons, the study is deemed suitable for acceptance.

Decision: Accept (Poster)