                                          P ITFALLS OF E PISTEMIC U NCERTAINTY Q UANTIFICATION THROUGH L OSS M INIMISATION




                                                                                       Viktor Bengsa , Eyke Hüllermeiera,b
                                                                          a
                                                                              Institute of Informatics, University of Munich (LMU)
                                                                                      b
                                                                                        Munich Center for Machine Learning
                                                                                    viktor.bengs@lmu.de, eyke@lmu.de
arXiv:2203.06102v2 [cs.LG] 13 Oct 2022




                                                                                         Willem Waegeman
                                                                        Department of Data Analysis and Mathematical Modeling
                                                                                           Ghent University
                                                                                    Willem.Waegeman@UGent.be



                                                                                              October 14, 2022

                                                                                                A BSTRACT
                                                  Uncertainty quantification has received increasing attention in machine learning in the recent past.
                                                  In particular, a distinction between aleatoric and epistemic uncertainty has been found useful in this
                                                  regard. The latter refers to the learner’s (lack of) knowledge and appears to be especially difficult to
                                                  measure and quantify. In this paper, we analyse a recent proposal based on the idea of a second-order
                                                  learner, which yields predictions in the form of distributions over probability distributions. While
                                                  standard (first-order) learners can be trained to predict accurate probabilities, namely by minimising
                                                  suitable loss functions on sample data, we show that loss minimisation does not work for second-
                                                  order predictors: The loss functions proposed for inducing such predictors do not incentivise the
                                                  learner to represent its epistemic uncertainty in a faithful way.

                                         1   Introduction
                                         The notion of uncertainty has received increasing attention in machine learning (ML) research in the last couple of
                                         years, especially due to the steadily increasing relevance of ML for practical applications. In fact, a trustworthy
                                         representation of uncertainty should be considered as a key feature of any ML method, all the more in safety-critical
                                         domains such as medicine [Yang et al., 2009, Lambrou et al., 2011] or socio-technical systems [Varshney, 2016,
                                         Varshney and Alemzadeh, 2017].
                                         In the literature, two inherently different sources of uncertainty are commonly distinguished, referred to as aleatoric
                                         and epistemic [Hora, 1996]. While the former refers to variability due to inherently random effects, the latter is
                                         uncertainty caused by a lack of knowledge and hence relates to the epistemic state of an agent. Thus, epistemic
                                         uncertainty can in principle be reduced on the basis of additional information, while aleatoric uncertainty is non-
                                         reducible.
                                         The distinction between different types of uncertainty and their quantification has also been adopted in the recent ML
                                         literature [Senge et al., 2014, Kendall and Gal, 2017], and various methods for quantifying aleatoric and epistemic
                                         uncertainty have been proposed [Hüllermeier and Waegeman, 2021]. In the context of supervised learning, the focus
                                         is typically on predictive uncertainty, i.e., the learner’s uncertainty in the outcome y ∈ Y given a query instance x ∈ X
                                         for which a prediction is sought. The aleatoric part of this uncertainty is due to the supposedly stochastic nature of
                                         the dependence between instances and outcomes, e.g. due to wrong class annotations or a lack of informative features.
                                         Therefore, the “ground-truth” is a conditional probability distribution p(· | x) on Y, i.e., each outcome y has a certain
                                         probability p(y | x) to occur. Even with full knowledge about p(· | x), the outcome cannot be predicted with certainty.
                                         Obviously, the learner does not have full knowledge of p(· | x). Instead, it produces a “guess” p̂(· | x) on the basis of the
                                         sample data provided for training. Broadly speaking, epistemic uncertainty is uncertainty about the true probability and
                                         hence the discrepancy between p and p̂. This (second-order) uncertainty can be captured and represented in different
                     Pitfalls of Epistemic Uncertainty Quantification through Loss Minimisation


ways. In the Bayesian approach, for example, the learner’s uncertainty is represented by the posterior predictive
distribution, which results from the posterior on the hypothesis space [Gal, 2016, Depeweg et al., 2018]; in other
words, uncertainty about the probabilistic predictor is translated into uncertainty about the prediction in a point x.
Alternatively, the authors of Jain et al. [2021] propose to capture the learner’s epistemic uncertainty by means of a
kind of meta-learner, which seeks to predict the difference between the total uncertainty (expected loss of the actual
predictor) and the aleatoric uncertainty (expected loss of the Bayes predictor); this excess loss is then equated with the
learner’s epistemic uncertainty.
Yet another quite popular idea is to estimate uncertainty in a more direct way, and to let the learner itself predict, not
only the target variable, but also its own uncertainty about the prediction [Sensoy et al., 2018, Malinin and Gales,
2018, 2019, Malinin et al., 2020, Charpentier et al., 2020, Huseljic et al., 2020, Kopetzki et al., 2021]. For example,
instead of predicting a probability distribution p̂(· | x), the learner may predict a second-order distribution in the form
of a distribution of distributions or a set of distributions [Shaker and Hüllermeier, 2020]. The learner’s epistemic
uncertainty is then represented by the “peakedness” of the former and the size of the latter.
Either way, looking at existing methods, it appears that epistemic uncertainty is difficult to quantify in an objective
manner. In fact, most methods dispose of parameters or other means that directly influence the amount of uncertainty,
rendering epistemic uncertainty quantification arbitrary to a large extent. At second glance, this is perhaps not very sur-
prising, because, unlike aleatoric uncertainty, epistemic uncertainty is not a property of the data or the data-generating
process, and there is nothing like a “ground truth” epistemic uncertainty. Instead, the learner’s uncertainty is influ-
enced in various ways, for example by underlying model assumptions and the prior knowledge it is equipped with. For
example, enlarging the learner’s hypothesis space and allowing it to fit the data in a more flexible way will increase
its epistemic uncertainty [Hüllermeier and Waegeman, 2021]. This is comparable to Bayesian inference, where the
informedness of the posterior strongly depends on the informedness of the prior (unless the sample size is very large).
In this paper, we demonstrate the difficulty of epistemic uncertainty quantification for one of the approaches that have
recently been proposed in the literature, namely, the direct prediction of second-order distributions through empirical
loss minimisation. Analysing this approach in a critical way, we isolate problems questioning its practicability (Section
3). These concerns are substantiated by formal results showing that the approach does not behave as it is supposed to
do (Section 4). These formal results are supported by simulations on synthetic data sets (Section 5)

2     Setting and Notation
Considering classification as a learning task, we assume a standard setting with instance space X , label space Y =
                                                      N
{y1 , . . . , yK }, and training data D = x(n) , y (n) n=1 ⊂ X ×Y . As usual, we also assume that the data is generated
i.i.d. according to an underlying joint probability measure P on X × Y, i.e., each z (n) = (x(n) , y (n) ) is a realisation
of Z = (X, Y ) ∼ P . Correspondingly, each instance x ∈ X is associated with a conditional distribution p(· | x) on
Y, such that p(y | x) is the probability to observe label y as an outcome given x.
Let P(Y) denote the set of probability distributions on Y, which can be identified with the K-simplex
                                 ∆K ..= θ = (θ1 , . . . , θK ) ∈ [0, 1]K | kθk1 = 1
                                          
                                                                                                                       (1)
of probability vectors θ, each of which identifies a categorical distribution Cat(θ). Slightly abusing notation, we shall
not distinguish between vectors and distributions (functions); for example, we write θ(y) instead of p(y), which means
that θ(y) = θk if y = yk . A summary of the notation used in this paper is given in Section A.

2.1   Learning Predictive Models
Suppose a hypothesis space H to be given, where a hypothesis h ∈ H is a mapping X −→ ∆K . Thus, a hypothesis
maps instances x ∈ X to probability distributions on outcomes. In standard supervised learning, the goal of the learner
is, based on a loss function L : ∆K × Y −→ R, to induce a hypothesis (predictive model) with low risk (expected
loss)                                           Z
                                      R(h) = .
                                             .         L(h(x), y) d P (x, y) .                                      (2)
                                                    X ×Y
The choice of a hypothesis is commonly guided by the empirical risk
                                                           N
                                                       1 X
                                        Remp (h) ..=         L h(x(n) ), y (n) ,
                                                                              
                                                                                                                       (3)
                                                       N n=1
i.e., the performance of a hypothesis on the training data. However, since Remp (h) is only an estimation of the true
risk R(h), the empirical risk minimiser ĥ ..= argminh∈H Remp (h) (or any other predictor) favored by the learner will


                                                               2
                     Pitfalls of Epistemic Uncertainty Quantification through Loss Minimisation


                    Level                       Representation            Loss         Ground truth
                                                      (2)
                    Level 2 (epistemic)         Q ∈ ∆ K , α ∈ RK  +       L2 (Q, y)        —
                    Level 1 (aleatoric)         p ∈ ∆K , θ ∈ [0, 1]K      L1 (θ, y)        θ∗
                    Level 0 (observational)     yk ∈ Y                    L0 (ŷ, y)       y∗


normally not coincide with the true risk minimizer (Bayes predictor) h∗ ..= argminh∈H R(h). Correspondingly, there
remains (epistemic) uncertainty regarding h∗ as well as the approximation quality of ĥ (in the sense of its proximity
to h∗ ) and the predictions p̂(· | x) = ĥ(x) produced by this hypothesis.

2.2   Learning Level-2 Predictors
Here, motivated by recent methods for uncertainty quantification, we are interested in learning a second-order or
level-2 predictor that is able to properly represent its own (epistemic) uncertainty, that is, a hypothesis of the form
                                                                 (2)
                                                   H : X −→ ∆K ,                                                     (4)
         (2)
where ∆K = P(P(Y)) denotes the set of second-order distributions, i.e., probability distributions on ∆K . If H(x) =
       (2)
Q ∈ ∆K , then Q assigns a probability (density) Q(θ) to each distribution θ ∈ ∆K , and the more certain the learner
about the true distribution, the more concentrated Q is.
                                                                                          (2)
If second-order or level-2 distributions are Dirichlet (cf. Appendix B), then every Q ∈ ∆K is identified by a parameter
                                 (2)
vector α ∈ RK                                                    K
              + , and hence ∆K with the parameter space R+ . Thus, hypotheses are of the form H : X −→ R+ ,
                                                                                                                    K

where H(x) = α(x) = (α1 (x), . . . , αK (x)) . Thus, the Dirichlet parameters αk are expressed as a function of
instances, and this dependence is supposedly captured by the underlying hypothesis space H.

2.3   Special Scenarios
For ease of exposition, we shall specifically look at the following scenarios, which are important special cases of the
general setting:
       • Binary classification: This is the case K = 2, where Y = {0, 1} consists of only two classes. The conditional
         distribution p(· | x) is now determined by the probability vector θ = (θ0 , θ1 ), i.e., by the two probabilities
         θ0 = p(0 | x) that Y = 0 and θ1 = p(1 | x) that Y = 1. As these sum up to 1, the learning problem effectively
         comes down to inference about the ground truth probability θ1 (x) = p(1 | x) of the positive class, and hence
         about the parameter of a Bernoulli distribution.
       • Coin tossing: This is a further simplification of the binary case, which can be seen as learning without
         instance space. Or, equivalently, we may assume an instance space X = {x0 } consisting of only a single
         instance, which is observed over and over again (and can therefore be ignored, as it does not carry any
         information). Like in the binary case, learning comes down to estimating a ground truth Bernoulli distribution
         with parameter θ1 ≡ p(1 | x), with the difference that this parameter no longer depends on x.
As an important difference, note that the coin tossing scenario provides several observations pertaining to a single
parameter θ1 , i.e., several realisations of the same Bernoulli random variable, and hence information in the form of
relative frequencies. This yields a solid statistical basis for estimating θ1 . In the more general (machine learning)
scenario, one can assume that at most a single observation is made in a point x ∈ X , which, in principle, does not
allow for estimating a probability [Barber et al., 2021]. The common way out is to make regularity assumptions, so that
outcomes observed for nearby points are also deemed representative for x to some extent. This becomes especially
explicit for local learning methods such as decision trees and nearest neighbours, where the class probabilities are
assumed to be constant within a certain region of the instance space — effectively, learning in such a region is thus
again reduced to the coin tossing scenario.

3     Learning Level-2 Predictors
In supervised learning, (level-0) samples drawn from the categorical random variable Y ∼ Cat(θ) are made avail-
able (explicitly or implicitly) as a basis for learning the level-1 distribution θ. However, corresponding samples are
actually not provided for the level-2 distribution Q. In principle, to estimate Q, for example a Dirichlet parameter
α, observations of realisations of that distribution would be needed, i.e., a sample in the form of probability vectors


                                                           3
                      Pitfalls of Epistemic Uncertainty Quantification through Loss Minimisation


θ (1) , . . . , θ (N ) ∼ Dir(α) . Given data of that kind, α could be estimated by means of maximum likelihood maximi-
sation or any other statistical method. However, such data cannot exist even in principle, because θ (resp. θ(x)) is
supposedly constant. This suggests that (probabilistic) learning on the epistemic level cannot be frequentist in nature,
unlike learning (about θ) on the aleatoric level. Instead, it appears that learning on the epistemic level is necessarily
Bayesian and requires a prior, which then of course has an influence on the degree of (epistemic) uncertainty. We shall
return to this point in Section 3.2.
In light of this, one may also wonder whether it is possible to learn a level-2 predictor (4) in the “classical” way
through loss minimisation, just like a level-1 predictor. In other words, is it possible to specify a level-2 loss function
                                                         (2)
                                                 L2 : ∆K × Y −→ R+                                                    (5)
comparing level-2 predictions Q(x) with level-0 observations y, so that minimising L2 on the training data D yields a
“good” level-2 predictor? This is the basic idea of direct epistemic uncertainty prediction [Sensoy et al., 2018, Malinin
and Gales, 2018, 2019, Malinin et al., 2020, Charpentier et al., 2020, Huseljic et al., 2020, Kopetzki et al., 2021].
Before the above question can be addressed, we need to clarify what we mean by “good” predictor. For level-1
predictors, this question is answered through the notion of proper scoring rules [Gneiting and Raftery, 2005]. These
are loss functions L1 that compare (first-order) probability distributions θ with outcomes Y and guarantee that the loss
minimiser coincides with the ground truth distribution θ ∗ (at least asymptotically). In other words, the expected loss
                                                    EY ∼θ∗ L1 (θ, Y )                                                (6)
is minimised by predicting θ̂ = θ ∗ . Consequently, proper scoring rules provide a loss-minimising learner with an
incentive to predict the true distribution, e.g. log-loss or quadratic loss [Kull and Flach, 2015].
This concept cannot be transferred directly to the case of level-2 predictions, simply because, as already mentioned,
there is no ground-truth Q∗ . Instead, a level-2 representation is a representation of the learner’s belief about the level-1
ground truth θ ∗ . So what exactly should be the purpose of a loss L2 ? In this regard, one should first of all notice that
a (level-1) loss function may in general serve different purposes:
       • A loss can be a target loss, which essentially means that it is determined by the application: L(θ̂, y) or L(ŷ, y)
         is the real cost caused by the level-1 prediction θ̂ or the level-0 prediction ŷ when the ground-truth is y.
       • A loss can be a surrogate loss, which means that it serves an auxiliary purpose and is used in a more indirect
         way: minimising the loss helps to achieve the actual goal, such as probability estimation in the case of proper
         scoring rules. Another example is the use of the hinge loss as a surrogate in classification; being convex and
         continuous, it simplifies training, although the true target is the 0/1 loss.
A level-2 loss should arguably be more of the second kind, and its purpose should be twofold: It should incentivise the
learner to make predictions that are correct in the sense of assigning high probability to the ground-truth θ ∗ , and at
the same time faithful in the sense of appropriately expressing the learner’s (epistemic) uncertainty. The second point
appears to be specifically delicate, due to the lack of an objective ground-truth. In fact, one may wonder how it should
be possible to evaluate the faithfulness of a prediction on the basis of empirical data in the form of observed class
labels. Besides, there is of course a risk of imposing the epistemic uncertainty on the learner, i.e., of incentivising a
representation of uncertainty only because it appears favourable from a loss minimisation perspective.

3.1   Averaging Level-1 Losses
Several authors have proposed the minimisation of an empirical loss of the form
                                                           N
                                                        1 X
                                                              L2 Q(n) , y (n) ,
                                                                             
                                                   L=                                                                    (7)
                                                        N n=1
                                          L2 (Q, y) = Eθ∼Q L1 (θ, y) ,                                                   (8)
         (n)          (n)
where Q      = H(x ). Thus, an individual prediction Q is penalised in terms of the expected level-1 loss, with
the expectation taken over the realisations of θ. For example, in Charpentier et al. [2020] the level-1 loss is defined
in terms of the cross entropy CE(θ, y (n) ) and (8) is called the uncertain cross entropy loss, while in the evidential
networks approach [Sensoy et al., 2018], L1 is the quadratic loss (Brier score).
This approach suggests an interpretation in terms of a “matching learner” which samples predictions θ ∼ Q at random
according to its current belief Q. But why should a learner predict in this way? For a learner seeking to minimise
expected loss, wouldn’t it be better to predict the most likely probability θ throughout? Indeed, if L1 is a convex loss,
then Jensen’s inequality implies that                 
                                              L1 θ̄, y ≤ Eθ∼Q L1 (θ, y) ,                                             (9)


                                                               4
                            Pitfalls of Epistemic Uncertainty Quantification through Loss Minimisation


where θ̄ = Eθ∼Q θ is the expected level-1 prediction. As can be seen, for the learner it is better to predict the expected
probability rather than sampling a probability θ at random. As a consequence, the learner will have a tendency to peak
the level-2 distribution, thereby pretending full certainty rather than representing uncertainty in an honest way. The
same happens in the case of a concave loss1 , although here the tendency is toward extreme predictions.
For illustration, consider the coin tossing scenario (i.e., estimation of a constant Bernoulli parameter θ1 ), and suppose
that N1 positive and N0 negative examples have been observed, hence N = N0 +N1 samples in total. Then, assuming
level-2 predictions Q in the form of Dirichlet distributions Dir(α), the loss minimiser of (7) is given by the Dirichlet
peaked at θ1 = N1/N , i.e., α = (c (1 − θ), c θ) for c → ∞. So strictly speaking, the loss minimiser is not even well
defined. But perhaps more important than this technical issue is the observation that the learner will always pretend
full certainty about θ1 , regardless of the sample size.
The case of a concave loss L1 leads to even more questionable predictions. Here, one obtains the Dirichlet peaked at
θ1 = 0 resp. θ1 = 1, i.e., α = (c, 0) resp. α = (0, c) for c → ∞, in the case where N0 > N1 resp. N0 < N1 . Thus,
the learner may even pretend full certainty about a distribution (e.g., θ1 = 1) although that distribution is definitely
excluded as the ground truth (e.g., because N0 > 0).
Note that a very similar effect can be observed “one level below” (level-1 loss as expected level-0 loss): Consider a
level-1 learner holding a probability p ∈ ∆K . This learner could be assessed by averaging over level-0 losses, i.e.,
                                                                    K
                                                                    X
                                                      L1 (p, y) =         p(yk )L0 (yk , y) ,                                          (10)
                                                                    k=1

where L0 could be the 0/1 loss. Again, even if p is a proper expression of the learner’s aleatoric uncertainty, it will not
be the minimiser of (10) and hence not be delivered by a loss-minimising learner. Instead, it will be best to predict the
mode y ∗ of p.

3.2        Bayesian Losses and Regularisation
Adopting a Bayesian perspective, a level-2 prediction Q would naturally be seen as the posterior uncertainty about θ
given the data, i.e.,
                                         Q(θ) = P(θ | y) ∝ P(y | θ) · P(θ) = θ(y) · Q0 (θ) ,
where Q0 is a prior on ∆K . Roughly speaking, (8) only captures the first part on the right-hand side, the likelihood,
but not the second part, the prior. Once again, this explains why putting all mass on a single θ, namely the one with
the maximum likelihood, is a plausible strategy. This will of course be avoided by proper Bayesian inference, because
the posterior will then be a compromise between the likelihood and the prior Q0 , which serves as a regulariser.
Interestingly, a close connection between Bayesian inference and learning through loss minimisation has been estab-
lished by Bissiri et al. [2016]. There, it is shown that a posterior Q is the minimiser of the loss
                                  Z
                 L(Q, y | Q0 ) = L1 (θ, y) Q(dθ) + dKL (Q, Q0 ) = Eθ∼Q L1 (θ, y) + dKL (Q, Q0 ) ,              (11)

where dKL denotes the KL-divergence and L1 (θ, y) is the loss caused by θ on the observation y. The latter is
given by the logarithmic (or self-information) loss − log f (y | θ) when the data is known to be generated by the
distribution with density f (y | θ), in which case (11) coincides with standard Bayesian inference. However, L1 can
also be another loss in case the data-generating process is not known. The authors consider (11) as a Bayesian version
of conventional empirical risk minimisation, when the interest is on probability measures Q on ∆K rather than point
estimates θ ∈ ∆K . The general solution can be shown to be of the following form:2
                                                                                exp(−L1 (θ, y))Q0 (θ)
                                    Q∗ (θ) = argmin L(Q, y | Q0 ) = R                                  .                               (12)
                                                  Q                             exp(−L1 (θ, y))Q0 (dθ)
Using the loss (11) in (7) yields the level-2 empirical loss
                                                               N
                                                            1 X
                                                                  L2 Q(n) , y (n) ,
                                                                                 
                                                       L=                                                                              (13)
                                                            N n=1

      1
          Albeit not very common in machine learning, such losses can Rbe useful for reasons of robustness [de Araujo et al., 2018].
      2
          As a technical assumption, the loss L1 must be such that 0 < exp(−L1 (θ, y)Q0 (dθ) < ∞.


                                                                          5
                      Pitfalls of Epistemic Uncertainty Quantification through Loss Minimisation


where
                                      L2 Q, y (n) = LE Q, y (n) + λ dKL (Q, Q0 )
                                                              
                                                                                                                           (14)
                                      LE Q, y (n) = Eθ∼Q L1 θ, y (n) .
                                                                   
                                                                                                                           (15)
The regularisation parameter λ might be needed in the general case where L1 is any loss function not necessarily
linked to an underlying density f . In that case, because L1 could be scaled differently, the “fidelity-to-data” and
“fidelity-to-prior” parts might not be calibrated, and hence need to be recalibrated through λ [Bissiri et al., 2016].
Assuming that the prior is the same for all data points (hence does not depend on n) and that level-2 predictions Q
for instances x are of the form Q = Hφ (x), where φ is indexing hypotheses (i.e., the hypothesis space is of the form
H = {Hφ | φ ∈ Φ}) and can be thought of as the model parameters fit to the data D, we obtain
                                          N
                                       1 X
                                             LE Hφ x(n) , y (n) + λ dKL Hφ x(n) , Q0 .
                                                                                 
                          L(φ, D) =                                                                                        (16)
                                       N n=1
Moreover, if Q0 is the uniform distribution, then the latter is the same as
                                            N
                                         1 X
                                               LE Hφ x(n) , y (n) − λ ENT Hφ x(n) ,
                                                                               
                            L(φ, D) =                                                                                      (17)
                                         N n=1
since the KL-divergence reduces to the (negative) entropy of the posterior. This is essentially the loss that is also used
in the Posterior Network method [Charpentier et al., 2020], where L1 in (15) is given by the cross-entropy, and in the
evidential networks approach [Sensoy et al., 2018], with L1 being the Brier score.
Note that, with a level-2 hypothesis Hφ , we can naturally associate the level-1 hypothesis
                                            hφ : X −→ ∆K , x 7→ Eθ∼Hφ (x) θ ,                                              (18)
which makes point predictions in the form of single probability distributions.
                                                                               For example, if level-2 hypotheses Hφ
are Dirichlet, i.e., Hφ (x) = Dir(α), then hφ (x) = θ1 (x), . . . , θK (x) , where
                                                             αk (x)
                                                  θk (x) = PK          .                                                   (19)
                                                            j=1 αj (x)


3.3   Discussion
The deviation from the prior Q0 obviously serves as a regulariser in (11), but it can also be interpreted from an
uncertainty quantification point of view. Recall that (11) can be seen as a compromise between fidelity to data and
fidelity to prior. Suppose the learner delivers the level-2 prediction Q, knowing that the final (level-1) prediction θ will
be sampled from that distribution, i.e., θ ∼ Q. If the learner has a good guess about the true θ ∗ , it should concentrate
Q in the corresponding region in ∆K , making sure that the sampled θ will be close to θ ∗ . To this end, however, it has
to deviate from the prior Q0 , which causes a cost dKL (Q, Q0 ). The latter can thus be seen as a measure of the strength
of the learner’s belief, i.e., the cost it is willing to pay for the concentration, and therefore as a measure of its certainty.
This matches quite perfectly with the use of the entropy of Q as a measure of epistemic uncertainty, which is obtained
when Q0 is the uniform distribution.
In this regard, it is also worth mentioning that a level-2 prior Q0 , i.e., a distribution on ∆K , is not directly comparable
with a level-1 prior θ 0 , i.e., a distribution on Y. This is mainly because
        • a distribution Q0 represents information about a ground truth θ ∗ , which, even if unknown (and treated as a
          random variable by the Bayesian approach), is assumed to exist and to be unique,
        • whereas a distribution θ 0 represents information about a random outcome Y.
For the purpose of illustration, take again the uniform prior as an example. Taking the uniform prior θ uni on Y as
a representation of complete ignorance is often criticised for the reason that this representation does not allow for
distinguishing between a real lack of knowledge about the ground truth θ ∗ and perfectly knowing that θ ∗ = θ uni ; in
the first case, θ uni is meant to represent the learner’s epistemic state, in the latter case it rather refers to an objective
reality. On the epistemic level, however, this confusion is actually not possible, because the uniform distribution Quni
on ∆K cannot have the second interpretation: Assuming that there is a unique ground truth θ ∗ , Quni cannot represent
an objective reality. Instead, it is clear that it represents the learner’s knowledge.
Note that the prior Q0 in (14) should not be confused with a prior on the hypothesis space H either. The latter is
commonly required in Bayesian learning. Assuming that hypotheses are identified by parameters φ ∈ Φ, as we did


                                                               6
                      Pitfalls of Epistemic Uncertainty Quantification through Loss Minimisation


in our setting, it would be a distribution on the parameter space Φ. Formally, a prior on H would result in a single
regularisation term that is added to the entire (cumulative) empirical loss. As opposed to this, Q0 is a pointwise penalty,
which is part of the level-2 loss function and applied to every training example (x(n) , y (n) ) individually.
The choice of the uniform distribution as a prior Q0 appears to be natural, especially with the “cost for concentration”
interpretation in mind, because the uniform distribution is least concentrated among all distributions. Restrictively, of
course, one has to say that a natural uniform prior may not exist in cases where the parameter space Θ is not bounded.
According to our discussion so far, the loss minimisation approach (14) appears to be quite appealing. However, this
approach is not without problems either. First, the loss minimiser Q will depend on the loss function L1 , i.e., different
representations of uncertainty will be obtained for different losses. This is questionable, because, even if a point
prediction — the “action” taken by the learner in the end — will clearly be influenced by the loss, one may wonder
whether the representation of uncertainty should not be independent. What this suggests is that (14) incentivises the
learner to represent its uncertainty about the best prediction rather than the ground truth.
As another, possibly more severe problem, note that the incentive to concentrate the prediction Q and to deviate from
the prior Q0 will also depend on two other factors: first, the actual ground truth θ ∗ itself, and second, the regularisation
parameter λ. For illustration, take again the example of coin tossing. As for the ground truth, note that a deviation from
the uniform prior will certainly be beneficial if the coin is very biased (θ1∗ is close to 0 or 1). In that case, sampling
θ1 uniformly at random will likely end up in a poor prediction. However, if the coin is fair (θ1∗ ≈ 1/2), the learner
will gain very little by concentrating Q around θ1 = 1/2, because predicting θ = (1/2, 1/2) with probability 1 will
yield roughly the same expected loss Ey∼B(θ1 ) L1 (θ, y) as sampling θ at random. Thus, there is little incentive for the
learner to concentrate in this case, especially considering that a concentration causes a cost.
This brings us to the second factor: the regularisation parameter λ has a direct influence on how costly a concentration
is. Therefore, it determines the optimal compromise between LE and dKL , and thereby the uncertainty represented
by the learner. Again, this is a questionable property, as it renders the uncertainty representation rather arbitrary. An
illustration is shown in Fig. 1, where the expectation of loss L2 (Q, y) in (13) with L1 being the cross-entropy loss
is plotted for different concentrations, regularisation parameters, and ground-truth parameters. As can be seen by the
minima, the optimal concentration depends on both, the regularisation and the ground truth. Thus, even when the
learner perfectly knows the ground truth, it may not predict a Q peaked around this parameter, but instead a much
flatter distribution, thereby suggesting to be more uncertain than it actually is.




Figure 1: Left: The expectation of the loss L2 (Q, y) in (13) as a function of the concentration c in Q = Dir(c, c) and
for different parameters λ ∈ {0, 1/4, 1/2, 3/4, 1} when L1 is the cross-entropy loss and θ ∗ = (1/2, 1/2). Right: The
same for θ ∗ = (1/4, 3/4) and Q = Dir(c, 3c).

In this regard, we should also put our previous argument in perspective, namely, that a uniform (or, more generally,
non-peaked) level-2 distribution cannot represent the ground truth. Although this is in principle true, the task of the
learner, as incentivised by the loss function, is not to learn the ground truth θ ∗ in the first place, but rather to make loss-
minimising predictions, and nothing prevents it from predicting a flat Q if it serves the purpose of incurring low loss.
Also note that the influence of the prior does not diminish with an increasing sample size, like in standard Bayesian
learning, because there is one prior per training instance (instead of a single prior for the entire data set).
Coming back to our example of tossing a fair coin, a prediction of Q = Quni should neither be interpreted as “not
knowing the ground-truth θ ∗ ”, nor as “not knowing the best prediction”, but rather as “knowing the prediction does
not matter”. This is of course also related to and essentially caused by the information gap, i.e., learning a level-2


                                                               7
                         Pitfalls of Epistemic Uncertainty Quantification through Loss Minimisation


prediction based on level-0 (instead of level-1) feedback. In fact, if the predictions θ ∼ Q would be compared to
observed distributions θ (n) instead of observed class labels y (n) , this would clearly call for concentrating Q around
θ∗ .

4       Formal Results
In the beginning of the previous section, we asked for the existence of a level-2 loss function that incentivises the
learner to report epistemic uncertainty in an honest way. Based on our previous discussion, one may wonder whether
such a loss can exist. In this section, we provide negative results for both level-2 loss functions considered above. We
give these results for the simple coin tossing scenario, but they can be easily extended to more complex settings. What
we mean by “appropriate loss” is specified as follows.
                                                    (2)
Definition 1. A level-2 loss function L2 : ∆K × Y −→ R+ , is appropriate if the following holds for the empirical
                                   PN             
loss minimiser Q(N ) = argminQ n=1 L2 Q, y (n) on any i.i.d. observational data sequence y (1) , y (2) , . . . with
y (i) ∼ θ ∗ :
    (A1) For any sample size N , Ey(1:N ) (U (Q(N ) )) ≥ Ey(1:N +1) (U (Q(N +1) )), where U is an uncertainty measure3
         and y (1:N ) abbreviates y (1) , . . . , y (N ) . Moreover, there exist some Ñ and k such that
                                             Ey(1:Ñ ) (U (Q(Ñ ) )) > Ey(1:Ñ +k) (U (Q(Ñ +k) )).

    (A2) Q(N ) → δθ∗ as N → ∞, where δθ∗ is the Dirac measure at θ ∗ .
                    P


In words, (A1) stipulates that the learner’s uncertainty should gradually decrease (in expectation) with increasing
sample size N . In the beginning, the empirical loss minimiser Q(N ) should represent high uncertainty (and ideally
be uniform for N = 0), and the larger N , the less uncertain Q(N ) should be in terms of the uncertainty measure
U . (A2) states that in the limit, i.e., if the sample size goes to infinity, all epistemic uncertainty should disappear,
and consequently the empirical loss minimiser should converge (in probability) to the Dirac measure δθ∗ , putting the
entire probability mass on the ground-truth θ ∗ . Both of these assumptions are natural (and minimal) requirements for
a suitable level-2 loss function, since honesty is required with respect to the epistemic uncertainty specification on the
one side, and consistency of the empirical loss minimiser on the other side.

Averaging Level-1 Losses. The following theorem shows that a loss minimisation approach using a level-2 loss
(8) with commonly used level-1 losses such as the Brier score or the log-loss (or cross-entropy) does not lead to an
appropriate level-2 loss (cf. Section C for the proof).
Theorem 1. For any level-1 loss function L1 : ∆K × Y −→ R+ that satisfies L1 (Eθ∼Q θ, ·) ≤ Eθ∼Q L1 (θ, ·) , the
level-2 loss in (8) is not appropriate.
Both the Brier score and the log-loss are convex and therefore satisfy the property of Theorem 1. Moreover, the proof
reveals an even worse property, namely that the empirical loss minimiser is always a Dirac measure, regardless of the
sample size N . Consequently, epistemic uncertainty is essentially never reported in a proper way.

Bayesian Losses and Regularisation. Next, we show that loss minimisation using Bayesian losses as in (14) does
not lead to an appropriate level-2 loss either, if instantiated with commonly used level-1 losses. First, we consider
the class of level-1 losses being locally Lipschitz-continuous around the minimiser and strictly proper. Formally, let
d(1) be some appropriate metric on ∆K , then there exists some constant L > 0 depending on L1 such that for any
θ ∗ ∈ ∆K and any θ which is close to θ ∗ (in a neighborhood N (θ ∗ ) in terms of d(1) ) it holds that
                                EY ∼θ∗ L1 (θ, Y ) − EY ∼θ∗ L1 (θ ∗ , Y ) < L d(1) (θ, θ ∗ ).                      (20)
The following theorem, the proof of which is deferred to Section D, shows that choosing too large a value for the
regularisation parameter λ in (14) leads to a violation of Assumption A2.
Theorem 2. For any strictly proper level-1 loss function L1 satisfying (20) for any θ, θ ∗ ∈ ∆K , and if λ > 0 is such
                             (2)
that there exists some Q̃ ∈ ∆K with support inside N (θ ∗ ), the neighborhood of θ ∗ , and
                                          L Q̃(N (θ ∗ )) supθ∈N (θ∗ ) d(1) (θ, θ ∗ )
                                                                                       < λ,
                                                          ENT(Q̃)
where Q̃(N (θ ∗ )) is the probability mass assigned to N (θ ∗ ) by Q̃, then the level-2 loss (14) is not appropriate.
    3
        For instance, U might be the entropy ENT.


                                                                 8
                               Pitfalls of Epistemic Uncertainty Quantification through Loss Minimisation


The following theorem shows that choosing the regularisation parameter λ in (14) too low leads to a violation of
Assumption A1 for level-1 losses similar to those in Theorem 1 (cf. Section E). For this purpose, denote by ∆    ˜ (2) the
                                                                                                                   K
           (2)                                          (2)
subset of ∆K consisting of all non-Dirac measures in ∆K .
Theorem 3. Let L1 : ∆K × Y −→ R+ be a level-1 loss function such that for any Q ∈ ∆     ˜ (2) there exists εQ > 0 satis-
                                                                                          K
                                                                                                                    εQ
fying Eθ∼Q L1 (θ, ·)−L1 (Eθ∼Q θ, ·) ≥ εQ . Then, the level-2 loss in (14) is not appropriate if λ ≤ inf Q∈∆˜ (2) ENT(Q) .
                                                                                                                                                                 K


Note that both the Brier score and the log-loss are strictly proper, strictly convex and satisfy the local Lipschitz property
(20).

Discussion. The above results are general in the sense that Q can be any level-2 distribution, not necessarily restricted
to Dirichlet distributions. Moreover, the results do not depend on the underlying uncertainty measure U in Assumption
A1 as long as U is not constant as well as maximal for the uniform distribution and minimal for Dirac measures. A
key problem of the loss minimisation approach, as revealed by the above results, is the following: The quality (and
hence loss) of a prediction Q cannot be judged solely in the context of a single observation y. For example, a very
uncertain prediction Q (e.g., close to uniform) is completely fine in the beginning, when N is small, but less desirable
when N grows large. In principle, the loss should also consider the current knowledge about θ ∗ , which, however,
is missing from its arguments. For the loss (14), this concretely means that the penalty term should be higher in the
beginning and lower later on, which could be achieved by specifying λ as a decreasing function of N rather than a
constant. Then, however, the learner’s uncertainty is again controlled in an external way.
Note that the two ranges for λ in Theorems 2 and 3 do not necessarily represent a partition of the positive real numbers,
so it would be possible in principle that there exists a range of λ values “in between” where Theorems 2 and 3 do not
apply. However, one must still note that the respective bounds for the ranges can potentially be brought closer together,
as they are chosen rather to simplify the proofs. For example, the choice of the bound for λ in Theorem 3 is extreme in
the sense that the empirical loss minimiser is always a Dirac measure. By slightly loosening this bound, one could show
that the empirical loss minimiser is “almost” a Dirac measure, which, however, would still violate Assumption A1.
Similarly the enumerator for λ in Theorem 2 is a rather rough estimate due to the supremum and could be tightened by
L Eθ∼Q̃ (d(1) (θ, θ ∗ )). Finally, note that both the Brier score and the log-loss are strictly convex and therefore satisfy
the property of Theorem 3 due to Jensen’s (strict) inequality.

5        Experiments
In the following, we investigate our findings regarding the empirical loss minimiser (ELM) (see Definition 1) in a
simulation study on synthetic data. We consider two representative scenarios for the binary classification setting
(i.e., K = |Y| = 2): the scenario with the highest aleatoric uncertainty, where p(y) = B(0.5) and a low aleatoric
uncertainty scenario, where p(y) = B(0.05). Note that the latter is representative of an imbalanced learning scenario.
For each scenario, we generate repeatedly observations of different sizes N and compute the corresponding ELM
for the Brier score as the underlying level-1 loss function in each run (the results for cross-entropy are similar and
hence omitted). As optimizing over all possible level-2 distributions is computationally expensive, we restrict the
optimization to two-component mixtures of Dirichlet distributions. In the following table, we report the mean entropy
(together with the standard deviations) of the ELM’s averaged over 10 runs in dependence on the data set size N for
different values of λ for both scenarios:
                                               p(y) = B(0.5)                                                                    p(y) = B(0.05)
               N = 10          N = 100          N = 1000        N = 10000       N = 100000      N = 10          N = 100          N = 1000      N = 10000         N = 100000
    λ=0        0.000 (0.000)   0.000 (0.000)    0.000 (0.000)   0.000 (0.000)   0.000 (0.000)   0.000 (0.000)   0.000 (0.000)    0.000 (0.000) 0.000 (0.000)     0.000 (0.000)
    λ = 10−5   0.000 (0.000)   0.000 (0.000)    0.000 (0.000)   0.000 (0.000)   0.000 (0.000)   0.000 (0.000)   0.000 (0.000)    0.000 (0.000) 0.000 (0.000)     0.000 (0.000)
    λ = 10−1   7.382 (1.278)   6.530 (0.000)    4.869 (0.000)   3.441 (0.734)   1.575 (0.056)   7.520 (0.368)   6.350 (0.250)    4.851 (0.002) 3.206 (0.000)     1.550 (0.046)
    λ = 0.5    9.216 (0.113)   7.689 (0.001)    5.980 (0.158)   4.369 (0.001)   2.728 (0.026)   8.349 (0.174)   7.148 (0.127)    5.928 (0.024) 4.360 (0.032)     2.707 (0.000)
    λ=1        9.615 (0.057)   8.189 (0.001)    6.430 (0.316)   4.935 (0.209)   3.215 (0.009)   8.852 (0.224)   7.598 (0.172)    6.330 (0.082) 4.852 (0.002)     3.207 (0.000)
    λ = 10     9.958 (0.009)   9.678 (0.011)    8.190 (0.000)   6.530 (0.000)   4.870 (0.001)   9.910 (0.012)   8.969 (0.044)    7.513 (0.051) 6.364 (0.016)     4.851 (0.000)
    θ̂         0.487 (0.108)   0.514 (0.064)   0.497 (0.019)    0.501 (0.005)   0.500 (0.002)   0.215 (0.028)   0.098 (0.013)    0.055 (0.005)   0.050 (0.002)   0.050 (0.001)


Note that the differential entropy the level-2 distributions takes values in R− so for ease of comparison we state here
the (Shannon) entropy of the quantized version of the level-2 distributions (see Sec. 8.3 inCover and Thomas [2006]),
where a value of zero corresponds to a one-point distribution and the uniform distribution has a value of 9.967 in this
case (i.e., 1000 bins are used). Furthermore, the last line reports the empirical mean for the corresponding sample size.
We see that for small values of λ the ELM is a point-mass (entropy of zero), while for large values of λ and huge sample
sizes the ELM is still far away from being a point-mass, which is in line with our theoretical results. Moreover, for
increasing values of λ, the ELM changes quite abruptly from one extreme (maximum certainty) to the other (maximum
uncertainty) when the sample size is small. Finally, the reported level-2 uncertainty is in both scenarios essentially


                                                                                      9
                      Pitfalls of Epistemic Uncertainty Quantification through Loss Minimisation


the same for all different choices of λ and sample sizes N , although the level-1 uncertainties are quite different. This
demonstrates that the influence of λ is in a sense quite arbitrary on the faithful epistemic uncertainty representation, as
it simply prevents the learner from being too confident without taking the underlying data-generating distribution into
account. In Appendix F we also consider a multi-class setting, where similar observations are made.

6   Conclusion
In machine learning, it is well known that probabilistic classifiers can be trained by empirical loss minimisation:
Suitably chosen loss functions, so-called proper scoring rules, incentivise the learner to predict probabilities in an
unbiased way, or, stated differently, the learner minimises expected loss if (and only if) it predicts the true (conditional)
probability distribution. In this paper, we investigated the question whether second-order predictors can be trained in
a similar way. This is motivated by recent proposals in the literature, where corresponding methods are used to
represent the learner’s epistemic uncertainty. Obviously, the problem is more challenging, especially due to the lack
of an objective ground truth, and because a level-2 representation has to be learned from level-0 data, i.e., data at
the observational level where only class labels but no probabilities (level-1 data) are observed. Indeed, our results are
negative in the following sense: Level-2 loss functions do not incentivise the learner to predict its epistemic uncertainty
in a faithful way. Instead, to minimise the loss in expectation, the learner is encouraged to pretend more (or less)
confidence than warranted. Besides, contrary to what one would expect, the uncertainty does not decrease with an
increasing sample size. Thus, we believe that the empirical findings reported in the literature should be reconsidered
and carefully analyzed in light of our results. While it is true that good results are obtained in the majority of existing
work, it is also true that the reasons for these results are not always fully transparent. Our results confirm the difficulty
of epistemic uncertainty quantification, which, we believe, is a general problem that also applies to other approaches.
Strictly speaking, however, our formal results only hold for the loss functions that have been proposed in the literature
so far, and hence do not completely exclude the existence of other types of losses providing the right incentives for
the learner. As future work, we plan to further elaborate on this problem, either coming up with an appropriate loss
function or proving that such a loss cannot exist.

Acknowledgments and Disclosure of Funding
Willem Wageman received funding from the Flemish Government under the “Onderzoeksprogramma Artificielë In-
telligentie (AI) Vlaanderen” Programme.

References
R. Foygel Barber, J. Candes, J. Emmanuel, A. Ramdas, and R.J. Tibshirani. The limits of distribution-free conditional
  predictive inference. Information and Inference, 10(2):455–482, 2021. doi: 10.1093/imaiai/iaaa017.
P.G. Bissiri, C.C. Holmes, and S.G. Walker. A general framework for updating belief distributions. Journal of the
  Royal Statistical Society: Series B (Statistical Methodology), 78(5):1103–1130, 2016.
B. Charpentier, D. Zügner, and S. Günnemann. Posterior network: Uncertainty estimation without OOD samples via
  density-based pseudo-counts. In Proc. NeurIPS, 33rd Neural Information Processing Systems, volume 33, pages
  1356–1367, 2020.
T. M. Cover and J. A. Thomas. Elements of Information Theory. Wiley, 2006.
R.W.M de Araujo, R. Hirata, and A. Rakotomamonjy. Concave losses for robust dictionary learning. In Proc. ICASSP,
  IEEE International Conference on Acoustics, Speech and Signal Processing, pages 2176–2180, Calgary, Canada,
  2018.
S. Depeweg, J.M. Hernandez-Lobato, F. Doshi-Velez, and S. Udluft. Decomposition of uncertainty in Bayesian
  deep learning for efficient and risk-sensitive learning. In Proc. ICML, 35th International Conference on Machine
  Learning, pages 1184–1193, 2018.
Y. Gal. Uncertainty in Deep Learning. PhD thesis, University of Cambridge, 2016.
T. Gneiting and A.E. Raftery. Strictly proper scoring rules, prediction, and estimation. Technical Report 463R,
   Department of Statistics, University of Washington, 2005.
S.C. Hora. Aleatory and epistemic uncertainty in probability elicitation with an example from hazardous waste man-
  agement. Reliability Engineering and System Safety, 54(2–3):217–223, 1996.
E. Hüllermeier and W. Waegeman. Aleatoric and epistemic uncertainty in machine learning: An introduction to
  concepts and methods. Machine Learning, 110(3):457–506, 2021. doi: 10.1007/s10994-021-05946-3.


                                                             10
                     Pitfalls of Epistemic Uncertainty Quantification through Loss Minimisation


D. Huseljic, B. Sick, M. Herde, and D. Kottke. Separation of aleatoric and epistemic uncertainty in deterministic deep
   neural networks. In Proc. ICPR, 25th International Conference on Pattern Recognition, pages 9172–9179. IEEE,
   2020.
Moksh Jain, Salem Lahlou, Hadi Nekoei, Victor Butoi, Paul Bertin, Jarrid Rector-Brooks, Maksym Korablyov, and
   Yoshua Bengio. DEUP: Direct epistemic uncertainty prediction. arXiv preprint arXiv:2102.08501, 2021.
A. Kendall and Y. Gal. What uncertainties do we need in Bayesian deep learning for computer vision? In Proc. NIPS,
   30th Advances in Neural Information Processing Systems, pages 5574–5584, 2017.
G.J. Klir. Uncertainty and Information: Foundations of Generalized Information Theory. Wiley, 2005.
A.-Kathrin Kopetzki, B. Charpentier, D. Zügner, S. Giri, and S. Günnemann. Evaluating robustness of predictive
   uncertainty estimation: Are Dirichlet-based models reliable? In Proc. ICML, 38th International Conference on
   Machine Learning, pages 5707–5718, 2021.
M. Kull and P. Flach. Novel decompositions of proper scoring rules for classification: Score adjustment as precursor
   to calibration. In Proc. ECML PKDD, European Conference on Machine Learning and Knowledge Discovery in
   Databases, pages 68–85, 2015.
A. Lambrou, H. Papadopoulos, and A. Gammerman. Reliable confidence measures for medical diagnosis with evolu-
   tionary algorithms. IEEE Trans. on Information Technology in Biomedicine, 15(1):93–99, 2011.
A. Malinin and M. Gales. Predictive uncertainty estimation via prior networks. In Proc. NeurIPS, 31st Advances in
   Neural Information Processing Systems, pages 7047–7058, 2018.
A. Malinin and M. Gales. Reverse KL-divergence training of prior networks: Improved uncertainty and adversarial
   robustness. In Proc. NeurIPS, 32nd Advances in Neural Information Processing Systems, pages 14520–14531,
   2019.
A. Malinin, B. Mlodozeniec, and M. Gales. Ensemble distribution distillation. In Proc. ICLR, 8th International
   Conference on Learning Representations, 2020.
R. Senge, S. Bösner, K. Dembczynski, J. Haasenritter, O. Hirsch, N. Donner-Banzhoff, and E. Hüllermeier. Reliable
   classification: Learning classifiers that distinguish aleatoric and epistemic uncertainty. Information Sciences, 255:
   16–29, 2014.
M. Sensoy, L. Kaplan, and M. Kandemir. Evidential deep learning to quantify classification uncertainty. In Proc.
   NeurIPS, 31st Conference on Neural Information Processing Systems, pages 3183–3193, Montreal, Canada, 2018.
M.H. Shaker and E. Hüllermeier. Aleatoric and epistemic uncertainty with random forests. In Proc. IDA, 18th
   International Symposium on Intelligent Data Analysis, volume 12080 of LNCS, pages 444–456, Konstanz, Germany,
   2020. Springer. doi: 10.1007/978-3-030-44584-3\ 35.
A.W. Van der Vaart. Asymptotic Statistics, volume 3. Cambridge University Press, 2000.
K.R. Varshney. Engineering safety in machine learning. In Proc. Inf. Theory Appl. Workshop, La Jolla, CA, 2016.
K.R. Varshney and H. Alemzadeh. On the safety of machine learning: Cyber-physical systems, decision sciences, and
   data products. Big data, 5(3):246–255, 2017.
F. Yang, H. Zhen Wanga, H. Mi, C. de Lin, and W. Wen Cai. Using random forest for reliable classification and
   cost-sensitive learning for medical diagnosis. BMC Bioinformatics, 10, 2009.




                                                          11
                     Pitfalls of Epistemic Uncertainty Quantification through Loss Minimisation


A    List of Symbols
The following table contains a list of symbols that are frequently used in the main paper as well as in the following
supplementary material.


                                                General Learning Setting
  K                              number of classes
  X                              instance space
  Y                              label space with labels y1 , . . . , yK
                                                             N
  D                              training data x(n) , y (n) n=1 ⊂ X × Y
  P                              data generating probability
  p(· | x)                       conditional distribution on Y, i.e., p(y | x) probability to observe y given x
  P(Y)                           the set of probability distributions    on Y
                                 the K-simplex, i.e., ∆K ..= θ = (θ1 , . . . , θK ) ∈ [0, 1]K | kθk1 = 1
                                                                 
  ∆K
  θ = (θ1 , . . . , θK )>        probability vector with K atoms, i.e., an element of ∆K
  θ uni := (1/K, . . . , 1/K)>   uniform distribution on Y (an element of ∆K )
  θ ∗ = θ ∗ (x)                  (conditional) distribution on Y, i.e., the ground-truth
                                                Level-1 Learning Setting
  H                              (level-1) hypothesis space consisting of hypothesis h : X −→ ∆K
  L1                             loss function for level-1 hypothesis, i.e., L1 : ∆K × Y −→ R
  Remp (·)                       empirical loss of a level-1 hypothesis (cf. (3))
  R(·)                           risk or expected loss of a level-1 hypothesis (cf. (2))
  ĥ                             empirical risk minimiser, i.e., ĥ = argminh∈H Remp (h)
  h∗                             true risk minimiser or Bayes predictor, i.e., h∗ = argminh∈H R(h)
                                                Level-2 Learning Setting
    (2)
  ∆K                             the set of distributions on ∆K
                                                                                       (2)
  H                              (level-2) hypothesis, i.e., a mapping h : X −→ ∆K
  Hφ                             indexed (level-2) hypothesis, where φ is an indexing hypothesis
  hφ                             level-1 hypothesis induced by Hφ (cf. (18))
                                                                                           (2)
  Q                              probability distribution on ∆K , i.e., an element of ∆K
                                                                                   (2)
  Quni                           uniform distribution on ∆K (an element of ∆K )
                                                                                     (2)
  L2                             loss function for level-2 hypothesis, i.e., L2 : ∆K × Y −→ R+
  LE                             expected level-1 loss (cf. (15))
  λ                              regularisation parameter (cf. (14))
    (2)
  Remp (·)                       empirical (level-2) loss of a level-2 hypothesis (appears only in the appendix)
  R(2) (·)                       (level-2) risk or expected loss of a level-2 hypothesis (appears only in the appendix)
  Q(N )                          empirical level-2 risk minimiser (for coin tossing problem), i.e.,
                                                             (2)
                                 Q(N ) = argminQ∈∆(2) Remp (Q)
                                                        K
                                                       Distributions
  B(θ)                           Bernoulli distribution with parameter θ ∈ [0, 1]
  Cat(θ)                         Categorical distribution with parameter θ ∈ ∆K
  Dir(α)                         Dirichlet distribution with parameter α ∈ RK   +
  δθ                             Dirac measure at θ ∈ ∆K
   P
  →                              convergence in distribution
                                                Entropy and Divergence
                                                           (2)
  ENT(·)                         Shannon entropy (on ∆K )
                                                                          (2)  (2)
  dKL (·, ·)                     Kullback-Leibler divergence (on ∆K × ∆K )
  d(1) (·, ·)                    some metric on ∆K
                                                                    (2)
  U (·)                          an uncertainty measure (on ∆K ), see Definition 1




                                                           12
                      Pitfalls of Epistemic Uncertainty Quantification through Loss Minimisation


B     The Dirichlet Distribution
A Dirichlet distribution Dir(α) is specified by means of K ≥ 2 positive real-valued parameters, i.e., a vector α =
(α1 , . . . , αK ) ∈ RK
                      + . The probability density function is defined on the K simplex
                                        (                                          K
                                                                                           )
                                                                                   X
                                                            >
                                ∆K = θ = (θ1 , . . . , θK ) | θ1 , . . . , θK ≥ 0,   θk = 1
                                                                                   k=1
and given as follows:
                                                                               K
                                                                         1 Y αk −1
                                    p(θ | α) = p(θ1 , . . . , θK | α) =      θk    ,
                                                                        B(α)
                                                                              k=1
where the normalisation constant is the multivariate beta function:
                                                         QK
                                                                Γ(αk )
                                              B(α) = k=1   PK       ,
                                                        Γ     k=1 αk

with Γ denoting the gamma function. In Bayesian statistics, the Dirichlet distribution is commonly used as the conju-
gate prior of the multinomial distribution. From a machine learning perspective, this makes it quite attractive for the
(multi-class) classification setting.
The parameters αk can be interpreted as evidence in favour of the k th category: the larger αk , the larger the probability
for a high θk , and hence the higher the probability to observe the k th category as outcome. More specifically, the
expected value of θk (and hence the natural estimate θ̂k ) is given by
                                                                 αk
                                                 E(θk ) = PK           .
                                                                j=1 αj
                                                                   PK
Moreover, the larger the parameters αk and hence the sum α0 = j=1 αj , the more “peaked” the Dirichlet distribution
becomes. For α1 = . . . = αK = 1, the uniform distribution on Θ is obtained, i.e., the “least informed” distribution
with highest entropy. For α1 = . . . = αK = c, with c the so-called concentration parameter, the distribution on Θ
remains symmetric. However, while it peaks at θ = (1/K, . . . , 1/K) for larger c > 1, it becomes more dispersed and
assigns higher probability mass around the “corners” of the probability simplex (θk = 1 and θj = 0 for all j 6= k) for
c close to 0.
As already said, the Dirichlet distribution is conjugate to the multinomial distribution. More specifically, Bayesian
updating of a prior Dir(α1 , . . . , αK ) in light of observed frequencies c1 , . . . , cK of the K categories yields the poste-
rior Dir(α1 + c1 , . . . , αK + cK ). In other words, Bayesian inference comes down to simple counting, which makes it
extremely simple. In this regard, the αk are often interpreted as “pseudocounts” of the categories.

B.1   Quantifying Epistemic Uncertainty
Suppose that epistemic uncertainty of the learner is represented by means of a Dirichlet Dir(α). Often, one is interested
in quantifying this uncertainty in terms of a single number. What is sought, therefore, is an uncertainty measure U
mapping distributions to real numbers. In the literature, various examples of such measures are known, with Shannon
entropy the arguably most prominent one. Like Shannon entropy, uncertainty measures are typically derived on an
axiomatic basis, i.e., a reasonable measure of uncertainty should obey certain properties [Klir, 2005].
The (differential) entropy of a Dir(α) distribution is given by
                                                                                K
                                                                                X
                          ENT(Dir(α)) = log B(α) + (α0 − K)ϕ(α0 ) −               (αj − 1)ϕ(αj ) ,                         (21)
                                                                                j=1

where ϕ is the digamma function.

C     Proof of Theorem 1
      (2)              PN                                                            (2)
Let Remp (Q) = N1 n=1 L2 Q, y (n) be the empirical risk of a level-2 prediction Q ∈ ∆K . As we consider a
                                           
level-2 loss as in (8), the empirical risk is given by
                                                          N
                                            (2)        1 X                  
                                         Remp (Q) =          Eθ∼Q L1 θ, y (n) .
                                                       N n=1


                                                              13
                      Pitfalls of Epistemic Uncertainty Quantification through Loss Minimisation


By assumption on the level-1 loss L1 , it holds that
                                                                N
                                         (2)                 1 X
                                                                   L1 Eθ∼Q θ, y (n) .
                                                                                   
                                        Remp (Q) ≥
                                                             N n=1

                                                (2)                                   (N )
    e (N ) be the minimiser over all Q ∈ ∆ of the right-hand side, then θ̃
Let Q                                                                                        = Eθ∼Qe(N ) θ is an element in ∆K .
                                          K
                                                            (N )
Define Q̂(N ) = δθ̃(N ) and note that Eθ∼Q̂(N ) θ = θ̃             . Then,

                                                                    N
                                      (2)                    1 X                        
                                     Remp (Q̂(N ) ) =              Eθ∼Q̂(N ) L1 θ, y (n)
                                                             N n=1
                                                                    N
                                                             1 X  (N ) (n) 
                                                       =           L1 θ̃ , y
                                                             N n=1
                                                                N
                                                             1 X
                                                                   L1 Eθ∼Qe(N ) θ, y (n) .
                                                                                        
                                                       =
                                                             N n=1

         (2)          (2)                             (2)
Thus, Remp (Q) ≥ Remp (Q̂(N ) ) for all Q ∈ ∆K . In particular, for any N the empirical loss minimiser is Q(N ) =
Q̂(N ) = δθ̃(N ) , so that Assumption A1 is violated.


D    Proof of Theorem 2
                                                                                        (2)
Let R(2) (Q) = EY ∼θ∗ L2 (Q, Y ) be the true risk of a level-2 prediction Q ∈ ∆K . As L2 is of the form as in (14), the
true risk is due to Fubini-Tonelli’s theorem given by

                                   R(2) (Q) = EY ∼θ∗ Eθ∼Q L1 (θ, Y ) − λENT(Q)
                                            = Eθ∼Q EY ∼θ∗ L1 (θ, Y ) − λENT(Q).

                                                                                                           (2)
Thus, R(2) (δθ∗ ) = EY ∼θ∗ L1 (θ ∗ , Y ) , since ENT(δθ ) = 0 for any θ ∈ ∆K . Hence, for Q̃ ∈ ∆K such that

                                        L Q̃(N (θ ∗ )) supθ∈N (θ∗ ) d(1) (θ, θ ∗ )
                                                                                     <λ
                                                            ENT(Q̃)

holds,

                  R(2) (Q̃) = Eθ∼Q̃ EY ∼θ∗ L1 (θ, Y ) − EY ∼θ∗ L1 (θ ∗ , Y ) − λENT(Q̃) + R(2) (δθ∗ )
                            < L Q̃(N (θ ∗ ))     sup        d(1) (θ, θ ∗ ) − λENT(Q̃) + R(2) (δθ∗ )
                                               θ∈N (θ ∗ )

                            < R(2) (δθ∗ ).

Consequently, the true risk minimiser differs from δθ∗ . Since L1 is a strictly proper loss, Theorem 5.7 by Van der
Vaart [2000] lets us infer that the empirical risk minimiser Q(N ) converges in probability to the minimiser of the true
risk, which violates Assumption A2.


E    Proof of Theorem 3
                                               (n)                      (n)
In the following, we abbreviate L2 Q, y (n) by L2 (Q) and L1 θ, y (n) by L1 (θ) . For any N , let

                                                         N
                                    e (N ) = argmin 1        (n)
                                                        X
                                    Q                       L2 (Q) − λENT(Q)
                                                ˜ (2) N
                                             Q∈∆       Kn=1


                                                                     14
                                  Pitfalls of Epistemic Uncertainty Quantification through Loss Minimisation


          (N )
and θ̃           = Eθ∼Qe(N ) θ. Further, set Q̂(N ) = δθ̃(N ) and note that
                                                                                        N
                                                         (2)                      1 X (n)  (N ) 
                                                        Remp (Q̂(N ) ) =               L   Q̂
                                                                                  N n=1 2
                                                                                        N
                                                                                  1 X (n)  (N ) 
                                                                             =         L   θ̃
                                                                                  N n=1 1
                                                                                        N
                                                                                  1 X (n)             
                                                                             =          L1  Eθ∼Qe(N ) θ .
                                                                                  N n=1

                                    ˜ that                (2)
With this, we can infer for any Q ∈ ∆ K
                                                  N
                       (2)                1 X (n)
                      Remp (Q) =               L (Q) − λENT(Q)
                                          N n=1 2
                                                  N
                                          1 X (n)         (n)
                                                                          
                                                                                         (2)
                                      =         L2 (Q) − L1     Eθ∼Qe(N ) θ − λENT(Q) + Remp (Q̂(N ) )
                                          N n=1
                                                  N
                                          1 X (n)  e (N )     (n)
                                                                                
                                                                                         e (N ) ) + R(2) (Q̂(N ) )
                                      ≥         L2 Q         − L1     Eθ∼Qe(N ) θ − λENT(Q           emp
                                          N n=1
                                                  N
                                          1 X                             (2)
                                                              e (N ) ) + Remp
                                      ≥        ε e(N ) − λENT(Q               (Q̂(N ) )
                                          N n=1 Q
                                         (2)
                                      ≥ Remp (Q̂(N ) ),
                                           e (N ) , the second last by the assumption on L1 , and the last inequality is by
where the first inequality is by choice of Q
choice of λ. Thus, the empirical loss minimiser is a Dirac measure, regardless of N , so that Assumption A1 is violated.

F         Further Experiments
In this section, we extend the simulation study from Section 5 regarding the behavior of the empirical loss minimiser
(ELM) (see Definition 1) over two-component mixtures of Dirichlet distributions to the multi-class classification
setting. Again, we shall resort to synthetic data and two representative scenarios for the multi-class classification
setting with three classes: the scenario with the highest aleatoric uncertainty, where
                                                                     p(·) = Cat (1/3, 1/3, 1/3)
and a low aleatoric uncertainty scenario, where
                                                                  p(·) = Cat (7/8, 1/16, 1/16) .
Note that the latter is representative of an imbalanced learning scenario. Following the same procedure as in Section
5, we obtain for the mean entropy (together with the standard deviations) of the ELM’s averaged over 10 runs in
dependence on the data set size N for different values of λ for both scenarios:
                                           p(y) = Cat (1/3, 1/3, 1/3)                                                     p(y) = Cat (7/8, 1/16, 1/16)
                 N = 10           N = 100         N = 1000        N = 10000       N = 100000      N = 10           N = 100        N = 1000        N = 10000        N = 100000
    λ=0          0.000 (0.000)    0.000 (0.000) 0.000 (0.000) 0.000 (0.000)       0.000 (0.000)   0.000 (0.000)    0.000 (0.000) 0.000 (0.000) 0.000 (0.000)       0.000 (0.000)
    λ = 10−5     0.000 (0.000)    0.000 (0.000) 0.000 (0.000) 0.000 (0.000)       0.000 (0.000)   0.000 (0.000)    0.000 (0.000) 0.000 (0.000) 0.000 (0.000)       0.000 (0.000)
    λ = 10       10.174 (0.014)   9.687 (0.013) 6.912 (0.002) 3.621 (0.001)       1.401 (0.002)   10.156 (0.139)   8.059 (0.112) 5.805 (0.092) 3.312 (0.021)       1.201 (0.001)
    θ̂1          0.321 (0.117)    0.328 (0.046)   0.336 (0.017)   0.332 (0.007)   0.333 (0.002)   0.726 (0.088)    0.850 (0.022)   0.874 (0.011)   0.880 (0.004)   0.875 (0.003)


For comparison purposes, we report here again the (Shannon) entropies of the quantized version of the level-2 dis-
tributions instead of their differential entropies (see Section 5). Since we use 1326 bins, the uniform distribution (on
level-2) has an entropy of 10.3729. Thus, the results are consistent with the empirical results for the binary classifica-
tion setting in Section 5 and, more importantly, with our theoretical results




                                                                                        15
