      Pitfalls of Epistemic Uncertainty Quantification
                  through Loss Minimisation


                                    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

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



                                               Abstract
         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 dis-
         tributions. 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 [27, 17] or
socio-technical systems [25, 26].
In the literature, two inherently different sources of uncertainty are commonly distinguished, re-
ferred to as aleatoric and epistemic [9]. 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 epi-
stemic 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 [21, 13], and various methods for quantifying aleatoric and epistemic
uncertainty have been proposed [10]. 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 in-
stance 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.

36th Conference on Neural Information Processing Systems (NeurIPS 2022).
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 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 [7, 6]; in other words, uncertainty about the
probabilistic predictor is translated into uncertainty about the prediction in a point x. Alternatively,
the authors of [12] 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 [22, 18,
19, 20, 3, 11, 15]. 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 [23]. 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 in-
fluence the amount of uncertainty, rendering epistemic uncertainty quantification arbitrary to a large
extent. At second glance, this is perhaps not very surprising, because, unlike aleatoric uncertainty,
epistemic uncertainty is not a property of the data or the data-generating process, and there is noth-
ing like a “ground truth” epistemic uncertainty. Instead, the learner’s uncertainty is influenced 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 [10]. 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 ap-
proaches 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 ,
                                                                         N
label space Y = {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 | ∥θ∥1 = 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


                                                   2
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
                                            XN
                          Remp (h) ..= N −1        L h(x(n) ), y (n) ,
                                                                    
                                                                                                    (3)
                                                   n=1

i.e., the performance of a hypothesis on the training data. However, since Remp (h) is only an estim-
ation of the true risk R(h), the empirical risk minimiser ĥ ..= argminh∈H Remp (h) (or any other
predictor) favored by the learner will normally not coincide with the true risk minimizer (Bayes pre-
dictor) 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
                             (2)
on ∆K . If H(x) = 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 identi-
                                                   (2)
fied by a parameter vector α ∈ RK                                                 K
                                   + , and hence ∆K with the parameter space R+ . Thus, hypotheses
                               K
are of the form H : X −→ R+ , 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 per-
taining 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
[1]. 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
                 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∗



3   Learning Level-2 Predictors
In supervised learning, (level-0) samples drawn from the categorical random variable Y ∼ Cat(θ)
are made available (explicitly or implicitly) as a basis for learning the level-1 distribution θ. How-
ever, 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 θ (1) , . . . , θ (N ) ∼ Dir(α) . Given
data of that kind, α could be estimated by means of maximum likelihood maximisation 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 learn-
ing 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 train-
ing data D yields a “good” level-2 predictor? This is the basic idea of direct epistemic uncertainty
prediction [22, 18, 19, 20, 3, 11, 15].
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 [8].
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 [16].
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 ex-
pressing 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.


                                                     4
3.1        Averaging Level-1 Losses
Several authors have proposed the minimisation of an empirical loss of the form
                                             XN
                                   L = N −1          L2 Q(n) , y (n) ,
                                                                    
                                                                                                                 (7)
                                                            n=1
                                    L2 (Q, y) = Eθ∼Q L1 (θ, y) ,                                                 (8)

where Q(n) = H(x(n) ). 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 [3] 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 [22], 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)

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.,
                                             XK
                                 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.
      1
          Albeit not very common in machine learning, such losses can be useful for reasons of robustness [5].


                                                           5
Interestingly, a close connection between Bayesian inference and learning through loss minimisation
has been established in [2]. 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
                                              XN
                                   L = N −1           L2 Q(n) , y (n) , where
                                                                     
                                                                                                          (13)
                                                 n=1
                        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 λ [2].
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
                              XN
              L(ϕ, D) = N −1           LE Hϕ x(n) , y (n) + λ dKL Hϕ x(n) , Q0 .
                                                                                   
                                                                                                 (16)
                                            n=1

Moreover, if Q0 is the uniform distribution, then the latter is the same as
                               XN
             L(ϕ, D) = N −1             LE Hϕ x(n) , y (n) − λ ENT Hϕ x(n) ,
                                                                          
                                                                                                          (17)
                                             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 [3], where L1 in (15) is given by the cross-entropy,
and in the evidential networks approach [22], 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)

                                                                                         if level-2
which makes point predictions in the form of single probability distributions. For example,
hypotheses Hϕ are Dirichlet, i.e., Hϕ (x) = Dir(α), then hϕ (x) = θ1 (x), . . . , θK (x) , where
                                              θk (x) = αk (x)/                .                           (19)
                                                               PK
                                                                 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 inter-
preted 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
      2
                                                                         R
          As a technical assumption, the loss L1 must be such that 0 <       exp(−L1 (θ, y)Q0 (dθ) < ∞.


                                                           6
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 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 appeal-
ing. 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 con-
centrations, 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.
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


                                                     7
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).




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).

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 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
                                                       PN        
for the empirical 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 uncer-
     tainty 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.
    3
        For instance, U might be the entropy ENT.


                                                          8
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 ,
                                                    (2)
and if λ > 0 is such that there exists some Q̃ ∈ ∆K with support inside N (θ ∗ ), the neighborhood
               L Q̃(N (θ ∗ )) supθ∈N (θ∗ ) d(1) (θ,θ ∗ )
of θ ∗ , and                  ENT(Q̃)
                                                           < λ, where Q̃(N (θ ∗ )) is the probability mass assigned
to N (θ ∗ ) by Q̃, then the level-2 loss (14) is not appropriate.
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
                   ˜ (2) the subset of ∆(2) consisting of all non-Dirac measures in ∆(2) .
purpose, denote by ∆ K                  K                                             K

Theorem 3. Let L1 : ∆K × Y −→ R+ be a level-1 loss function such that for any Q ∈ ∆       ˜ (2) there
                                                                                            K
exists εQ > 0 satisfying Eθ∼Q L1 (θ, ·) − L1 (Eθ∼Q θ, ·) ≥ εQ . Then, the level-2 loss in (14) is not
                                  εQ
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. Due to space limitations,
we defer further discussion of the theoretical results to the Appendix F.

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 uncer-
tainty, where p(y) = B(0.5) and a low aleatoric uncertainty scenario, where p(y) = B(0.05). Note


                                                                 9
that the latter is representative of an imbalanced learning scenario. For each scenario, we gener-
ate 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 com-
parison we state here the (Shannon) entropy of the quantized version of the level-2 distributions
[4], 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 em-
pirical 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 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 G 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 “Onderzoekspro-
gramma Artificielë Intelligentie (AI) Vlaanderen” Programme.


                                                                                     10
References
 [1] 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.
 [2] P.G. Bissiri, C.C. Holmes, and S.G. Walker. A general framework for updating belief distribu-
     tions. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 78(5):1103–
     1130, 2016.
 [3] 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 In-
     formation Processing Systems, volume 33, pages 1356–1367, 2020.
 [4] T. M. Cover and J. A. Thomas. Elements of Information Theory. Wiley, 2006.
 [5] 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.
 [6] S. Depeweg, J.M. Hernandez-Lobato, F. Doshi-Velez, and S. Udluft. Decomposition of uncer-
     tainty in Bayesian deep learning for efficient and risk-sensitive learning. In Proc. ICML, 35th
     International Conference on Machine Learning, pages 1184–1193, 2018.
 [7] Y. Gal. Uncertainty in Deep Learning. PhD thesis, University of Cambridge, 2016.
 [8] T. Gneiting and A.E. Raftery. Strictly proper scoring rules, prediction, and estimation. Tech-
     nical Report 463R, Department of Statistics, University of Washington, 2005.
 [9] S.C. Hora. Aleatory and epistemic uncertainty in probability elicitation with an example from
     hazardous waste management. Reliability Engineering and System Safety, 54(2–3):217–223,
     1996.
[10] 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.
[11] D. Huseljic, B. Sick, M. Herde, and D. Kottke. Separation of aleatoric and epistemic uncer-
     tainty in deterministic deep neural networks. In Proc. ICPR, 25th International Conference on
     Pattern Recognition, pages 9172–9179. IEEE, 2020.
[12] 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.
[13] 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.
[14] G.J. Klir. Uncertainty and Information: Foundations of Generalized Information Theory.
     Wiley, 2005.
[15] A.-Kathrin Kopetzki, B. Charpentier, D. Zügner, S. Giri, and S. Günnemann. Evaluating ro-
     bustness of predictive uncertainty estimation: Are Dirichlet-based models reliable? In Proc.
     ICML, 38th International Conference on Machine Learning, pages 5707–5718, 2021.
[16] 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 Ma-
     chine Learning and Knowledge Discovery in Databases, pages 68–85, 2015.
[17] A. Lambrou, H. Papadopoulos, and A. Gammerman. Reliable confidence measures for medical
     diagnosis with evolutionary algorithms. IEEE Trans. on Information Technology in Biomedi-
     cine, 15(1):93–99, 2011.
[18] 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.


                                                 11
[19] A. Malinin and M. Gales. Reverse KL-divergence training of prior networks: Improved un-
     certainty and adversarial robustness. In Proc. NeurIPS, 32nd Advances in Neural Information
     Processing Systems, pages 14520–14531, 2019.
[20] A. Malinin, B. Mlodozeniec, and M. Gales. Ensemble distribution distillation. In Proc. ICLR,
     8th International Conference on Learning Representations, 2020.
[21] 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 epi-
     stemic uncertainty. Information Sciences, 255:16–29, 2014.
[22] 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.
[23] 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.
[24] A.W. Van der Vaart. Asymptotic Statistics, volume 3. Cambridge University Press, 2000.
[25] K.R. Varshney. Engineering safety in machine learning. In Proc. Inf. Theory Appl. Workshop,
     La Jolla, CA, 2016.
[26] 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.
[27] 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.




                                                  12
