                           E NS L OSS: Stochastic Calibrated Loss Ensembles
                              for Preventing Overfitting in Classification


                                                                Ben Dai 1


                           Abstract                                     produces a predicted class sign(f (x)) to predict the true
                                                                        class Y ∈ {−1, +1}. The performance of the classification
       Empirical risk minimization (ERM) with a com-
                                                                        function f is typically evaluated using the risk function
       putationally feasible surrogate loss is a widely
                                                                        based on the zero-one loss:
       accepted approach for classification. Notably, the
       convexity and calibration (CC) properties of a
                                                                                                                 
                                                                                       R(f ) = E 1(Y f (X) ≤ 0) ,               (1)
       loss function ensure consistency of ERM in maxi-
       mizing accuracy, thereby offering a wide range of                where 1(·) is an indicator function, and the classification
       options for surrogate losses. In this article, we pro-           accuracy is defined as Acc(f ) = 1 − R(f ). Clearly, the
       pose a novel ensemble method, namely E NS L OSS,                 Bayes decision rule f ∗ (x) = sgn(P(Y = 1|X = x) − 1/2)
       which extends the ensemble learning concept to                   is a minimizer of the risk function R(f ). Due to the discon-
       combine loss functions within the ERM frame-                     tinuity of the indicator function, the zero-one loss is usually
       work. A key feature of our method is the con-                    replaced by a convex and classification-calibrated loss ϕ
       sideration on preserving the “legitimacy” of the                 to facilitate the empirical computation (Lin, 2004; Zhang,
       combined losses, i.e., ensuring the CC properties.               2004b; Bartlett et al., 2006). For example, typical losses
       Specifically, we first transform the CC conditions               including the hinge loss ϕ(z) = (1 − z)+ for SVMs (Cortes
       of losses into loss-derivatives, thereby bypassing               & Vapnik, 1995), the exponential loss ϕ(z) = exp(−z) for
       the need for explicit loss functions and directly                AdaBoost (Freund & Schapire, 1995; Hastie et al., 2009),
       generating calibrated loss-derivatives. Therefore,               and the logistic loss ϕ(z) = log(1 + exp(−z)) for logistic
       inspired by Dropout, E NS L OSS enables loss en-                 regression (Cox, 1958), and others (Lin et al., 2017; Leng
       sembles through one training process with doubly                 et al., 2022). Then, the risk based on ϕ(·) is defined as:
       stochastic gradient descent (i.e., random batch                                                             
       samples and random calibrated loss-derivatives).                                   Rϕ (f ) = E ϕ(Y f (X)) .
       We theoretically establish the statistical consis-
                                                                        Note that convexity and classification-calibration (hereafter
       tency of our approach and provide insights into
                                                                        referred to as calibration for simplicity) are widely accepted
       its benefits. The numerical effectiveness of E N -
                                                                        requirements for a loss function ϕ(z). The primary motiva-
       S L OSS compared to fixed loss methods is demon-
                                                                        tions behind these requirements are that convexity facilitates
       strated through experiments on a broad range of
                                                                        computations, while calibration ensures the statistical con-
       45 pairs of CIFAR10 datasets, the PCam image
                                                                        sistency of the empirical estimator derived from Rϕ , as
       dataset, and 14 OpenML tabular datasets and with
                                                                        formally defined below.
       various deep learning architectures. Python repos-
       itory and source code are available on G IT H UB.                Definition 1.1 (Bartlett et al. (2006)). A loss function ϕ(·) is
                                                                        classification-calibrated, if for every sequence of measurable
                                                                        function fn and every probability distribution on X × {±1},
1. Introduction                                                          Rϕ (fn ) → inf Rϕ (f ) implies that R(fn ) → inf R(f ),
                                                                                       f                                    f
The objective of binary classification is to categorize each
instance into one of two classes. Given a feature vector                as n approaches infinity.
X ∈ X ⊂ Rd , a classification function f : Rd → R
                                                                        According to Definition 1.1, a calibrated loss function ϕ
   1
   Department of Statistics, The Chinese University of Hong             guarantees that any sequence fn that optimizes Rϕ will
Kong. Correspondence to: Ben Dai <bendai@cuhk.edu.hk>.                  eventually also optimize R, thereby ensuring consistency
Proceedings of the 42 nd International Conference on Machine            in maximizing classification accuracy. To achieve this, the
Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025             most commonly used and direct approach is ERM, which
by the author(s).                                                       directly minimizes the empirical version of Rϕ to obtain

                                                                    1
                                        E NS L OSS: Stochastic Calibrated Loss Ensembles

fn . Specifically, given a training dataset (xi , yi )ni=1 , the       article is to also propose a novel regularization method E N -
ϕ-classification framework is formulated as:                           S L OSS, which differs from existing regularization methods,
                                                                       or rather, regularizes the model from a different perspective.
                                     n
                       bϕ (f ) := 1
                                    X               
 fbn = argmin R
              bϕ (f ), R                ϕ yi f (xi ) , (2)             Our motivation. The primary motivation for E NS L OSS
         f ∈F                     n i=1                                stems from ensemble learning, but it specifically focuses the
                                                                       perspective of loss functions, applying the ensemble concept
where F = {fθ : θ ∈ Θ} is a candidate class of classi-                 to combine various “valid” losses. As mentioned previously,
fication functions. For instance, F can be specified as, a             numerous CC losses can act as a valid surrogate loss in (2),
Reproducing kernel Hilbert space (Aronszajn, 1950; Wahba,              yielding favorable statistical properties in terms of the zero-
2003), neural networks, or deep learning (DL) models (Le-              one loss in (1). Yet, pinpointing the optimal surrogate loss
Cun et al., 2015). Notably, most successful classification             in practical scenarios remains a challenge. A potentially
methods fall within the ERM framework of (2), utilizing                effective idea is loss ensembles, by implementing an ensem-
various loss functions and functional spaces.                          ble of classification functions fitted from various valid loss
Given a functional space F, the training process of ERM in             functions. However, for large models, particularly those
(2) focus on optimizing the parameters θ within Θ. Stochas-            involving deep learning, the computational cost associated
tic gradient descent (SGD; (Bottou, 1998; LeCun et al.,                with multiple training sessions can often be prohibitively
2002)) is widely adopted for its scalability and generaliza-           expensive. It is worth mentioning that a similar computation
tion when dealing with large-scale datasets and DL models.             challenge is also prevalent with model ensembles or model
Specifically, in the t-th iteration, SGD randomly selects one          combination. This issue, has been effectively addressed by
or a batch of samples (xib , yib )B                                    Dropout (Srivastava et al., 2014): by randomly taking dif-
                                    b=1 with the index set IB ,
and subsequently updates the model parameter θ as:                     ferent network structures during each SGD update, thereby
                                                                       achieving the outcome akin to model ensembles. In our
                  1 X                                                  content, we employ a loosely analogous of Dropout, adopt
 θ (t+1) = θ (t) − γ     ∇θ ϕ(yi fθ(t) (xi ))
                  B                                                    different surrogate losses in each SGD update to achieve the
                    i∈IB
                                                                       objective of loss ensembles. This motivating idea behind
                1 X
    = θ (t) − γ      yi ∂ϕ(yi fθ(t) (xi )) ∇θ fθ(t) (xi ), (3)         E NS L OSS is roughly outlined in Table 1.
                B
                    i∈IB

where γ > 0 represents a learning rate in SGD, the second
                                                                       2. Related Works
equality follows from the chain rule, and ∇θ fθ (x) can be             This section provides a literature review of related works on
explicitly computed when the form of fθ or F is specified.             regularization methods for mitigating overfitting, as well as
The ERM paradigm (2) with calibrated losses, when com-                 related ML literature focused on the loss function.
bined with ML models and optimized using SGD, has                      Dropout. One simple yet highly effective method for pre-
achieved tremendous success in numerous real-world appli-              venting overfitting is dropout (Srivastava et al., 2014). The
cations. Notably, with deep neural networks, it has become             key advantage of Dropout lies in its ability to simulate an
a cornerstone of supervised classification in modern datasets          ensemble approach during SGD updates, thereby mitigating
(Goodfellow et al., 2016; Krizhevsky et al., 2012; He et al.,          overfitting without substantial computational costs. Thus,
2016; Vaswani, 2017).                                                  Dropout has become a standard component in many DL ar-
Overfitting. The overparameterized nature of deep neural               chitectures, and its advantages have been widely recognized.
networks is often necessary to capture complex patterns                Notably, the direction of ensemble in Dropout is achieved
and various datasets in the real world, thereby achieving              through different model architectures, whereas our method
state-of-the-art performance. However, one of the most per-            achieves ensemble through different “valid” loss functions.
vasive challenges in DL models is the problem of overfitting,          Thus, the proposed method and Dropout exhibit a comple-
where a model becomes overly specialized to the training               mentary relationship and can be used simultaneously, as
data and struggles to generalize well to testing datasets. Par-        implemented in Section 4.4.
ticularly, DL models can even lead to a phenomenon where               Penalization methods. Another approach to mitigate over-
they perfectly fit the training data, achieving nearly zero            fitting is to impose penalties or constraints (such as a L1 /L2
training error, but typically, with a significant gap often            norm) on model parameters, which aims to reduce model
persisting between the training (close to zero) and testing            complexity and thus prevent overfitting (Hoerl & Kennard,
errors, a discrepancy attributable to overfitting. Given this          1970; Tibshirani, 1996; Zou & Hastie, 2005). Similar ap-
fact, many regularization methods (c.f. Section 2) have been           proaches include weight decay during SGD (Loshchilov &
proposed, achieving remarkable improvements in alleviating             Hutter, 2017). The underlying intuition is to strike a balance
overfitting in overparameterized models. The purpose of this

                                                                   2
                                        E NS L OSS: Stochastic Calibrated Loss Ensembles

between model complexity and data fitting, thereby miti-
                                                                       Table 1. Stochastic calibrated loss ensembles under SGD. Upper:
gating overfitting through the bias-variance tradeoff. Thus,
                                                                       A standard SGD updates (based on a fixed surrogate loss). Lower:
these methods can also be seamlessly integrated with the               Informal outline for the proposed loss ensembles method (please
proposed method, as demonstrated in Section 4.4.                       refer to Algorithm 1 for the formal details).
Classification-calibration. Note that the zero-one loss (or
accuracy) cannot be directly optimized due to its discon-               SGD + Fixed Loss
tinuous nature, and thus, a surrogate loss is introduced to             For each iteration:
facilitate the computation. A natural question that arises
is: how can we ensure that the classifier obtained under the                • batch sampling from a training set;
new loss performs well in terms of accuracy? The answer                     • implement SGD on batch samples and a fixed sur-
leads to the definition of classification-calibration for a loss              rogate loss.
function (Definition 1.1). Meanwhile, a series of works (Lin,           SGD + Ensemble Loss (E NS L OSS; our)
2004; Zhang, 2004b; Lugosi & Vayatis, 2004; Bartlett et al.,
2006) have finally summarized loss calibration to a simple if-          For each iteration:
and-only-if condition, as stated in Theorem 3.1. Calibration               • batch sampling from a training set;
is an extensively validated condition through both empirical              ✚ randomly generate a new “valid” surrogate loss;
and theoretical consideration, and is widely regarded as a                ➜ implement SGD on batch samples and the generated
necessary minimal condition for a loss function.                             surrogate loss.
Post loss ensembles. A straightforward approach to con-
structing loss ensembles is to fit separate classifiers for each       the notable advantages of our proposed method over fixed
calibrated losses (e.g., SVM and logistic regression) and              losses. The experimental results in Figure 1 and Section
then combining their outputs using simple ensemble meth-               4 are highly promising, suggesting that E NS L OSS has the
ods, such as bagging, stacking, or voting (Breiman, 1996;              potential to significantly improve the performance of the
Wolpert, 1992). This approach has empirically achieved                 fixed loss framework, with this improvement exhibiting a
satisfactory performance; however, its major drawback is               universal nature across epochs and various network mod-
that it requires refitting a classifier for each loss, resulting       els. The detailed setup and comprehensive evaluation of
in substantial computational costs that make it impractical            our method’s empirical performance, along with related
for large complex models.                                              exploratory experiments, can be found in Section 4.

Loss Meta-learn. A recently related topic is the learning of           Based on the empirical evidence of its promising perfor-
loss functions via the meta-learn framework in multiple-task           mance, we are now prepared to discuss the proposed loss
learning or domain adaptation (Gonzalez & Miikkulainen,                ensembles method in detail. Certainly, the generation of
2021; Bechtle et al., 2021; Gao et al., 2022; Raymond, 2024).          surrogate loss functions is not arbitrary; it must still satisfy
These methods primarily employ a two-step approach: first,             the requirements for consistency or calibration (Lin, 2004;
learning a loss function from source datasets/tasks via                Zhang, 2004b; Bartlett et al., 2006). Furthermore, the im-
bilevel optimization under Model-Agnostic Meta-Learning                pact of the loss function under SGD is solely reflected in the
(Finn et al., 2017), and then applying the learned loss to tra-        loss-derivative, as discussed in subsequent sections. Thus,
ditional ERM in the target tasks/datasets. While they share            our primary focus is on the development of conditions of
some similarities with our approach in relaxing the fixed              “valid” losses or loss-derivatives, as well as how to randomly
loss in ERM, they are mainly applied in transfer learning              produce them.
and typically require additional source tasks or datasets to
learn the loss, differing from our setting and objectives.             3.1. Calibrated loss-derivative
                                                                       In this section, we aim to list the conditions for a valid loss
3. Calibrated Loss Ensembles                                           and transform them into loss-derivative conditions, thereby
                                                                       facilitating the usage in SGD training; ultimately, these con-
As previously mentioned in the introduction, the motiva-               ditions directly inspire the implementation of our algorithm,
tion behind E NS L OSS lies in incorporating different loss            with the overall motivation illustrated in Figure 2.
functions into SGD updates. The proposed method can be
delineated roughly within an informal outline in Table 1               As indicated in the literature (c.f. Section 2), the well-
(refer to Algorithm 1 for the formal details).                         accepted conditions for a valid surrogate loss ϕ are: (i)
                                                                       convexity; (ii) calibration. The key observation of SGD in
Key empirical results. Before delving into the technical de-           (3) is that the impact of the loss function ϕ on SGD or other
tails of our method, we begin by providing a representative            (sub)gradient-based algorithms is solely reflected in its loss-
“epoch-vs-test accuracy” curve (Figure 1), to underscore               derivative ∂ϕ. Interestingly, the convexity and calibration

                                                                   3
                                                                  E NS L OSS: Stochastic Calibrated Loss Ensembles

                                model = MobileNetV2                                                model = ResNet34                                           model = VGG16
             0.80                                                                                                                       0.82
                                                                         0.72
                                                                                                                                        0.80
             0.75
                                                                         0.70
                                                                                                                                        0.78
             0.70                                                        0.68
                                                                                                                                        0.76                                                loss
  test_acc




                                                                                                                                                                                            ensLoss
                                                                         0.66                                                                                                               BCELoss
             0.65                                                                                                                       0.74
                                                                                                                                                                                            Hinge
                                                                                                                                                                                            EXP
                                                                         0.64
                                                                                                                                        0.72
             0.60                                                        0.62
                                                                                                                                        0.70

                                                                         0.60
             0.55                                                                                                                       0.68

                    25   50     75    100     125     150   175    200            25     50    75       100     125   150   175   200          25   50   75      100      125   150   175     200
                                      epoch                                                             epoch                                                     epoch

Figure 1. Comparison of epoch-vs-test accuracy curves for various models on CIFAR2 (cat-dog) dataset using E NS L OSS (ours) and other
fixed losses (logistic, hinge, and exponential losses). The training accuracy curves are omitted, as they have largely stabilized at 1 after
few epochs. The pattern shown in the figure, where E NS L OSS consistently outperforms the fixed losses across epochs, is a phenomenon
observed in almost all CIFAR10 label-pairs and the PCam dataset, and with different scales of ResNet, MobileNet, and VGG architectures.


              ϕ                       ∂ϕ                                  ALGO                                Corollary D.1. Secondly, although some unbounded below
 Convex                       ∂ϕ nondecreasing                    Lines 8-11                                  losses are proved calibrated in certain specific data distri-
                                                                  (sorted negative r.v.s. as ∂ϕ)
 Calibration                  ϕ′(0) < 0                                                                       butions, yet they may introduce instability in the training
 Bounded                      Superlinear                         Lines 12-13                                 process when using SGD in our numerical experiments, see
                                                                  (rescale loss-derivatives)
 below                        raising-tail                                                                    more discussion in Appendix D. Therefore, we impose the
                                                                                                              bounded below condition for a loss ϕ, or a form of regularity
Figure 2. The overall motivation behind generating “valid” loss-                                              condition on the loss-gradient ∂ϕ, see Lemma 3.2.
derivatives in our algorithm: first transform the loss conditions                                             Lemma 3.2. Let ϕ is convex and calibrated.  R ∞If there exists
(left) into loss-derivative (middle), thereby bypassing the loss and                                          a continuous function g(z) > 0 such that z0 g(z)dz con-
directly generating loss-derivatives in SGD algorithms (right).                                               verges, and ∂ϕ(z)/g(z) is nondecreasing when z ≥ z0 for
                                                                                                              some z0 > 0. Then, ϕ is bounded below.
conditions for ϕ can also be transformed to ∂ϕ: (i) convex-                                                   Lemma 3.2 offers an implementation to translate the
ity can be ensured by stipulating that its loss-derivative is                                                 bounded below condition of loss functions into require-
non-decreasing, and (ii) a series of literature (Lin, 2004;                                                   ments on the loss-derivatives. Without loss of generality, we
Zhang, 2004b; Lugosi & Vayatis, 2004; Bartlett et al., 2006)                                                  set z0 = 1 in the subsequent discussion. This is analogous
is finally summarized in the subsequent theorem, which                                                        to the cut-off point in the hinge loss, which can be nullified
provides a necessary and sufficient condition for calibration.                                                through scaling f (x) and does not significantly affect per-
Theorem 3.1 (Classification-calibration; (Bartlett et al.,                                                    formance. Additionally, g(z) can be chosen as p-integrals,
2006)). Let ϕ be convex. Then ϕ is classification-calibrated                                                  i.e., g(z) = 1/z p for p > 1. Naturally, a smaller value of
if and only if it is differentiable at 0 and ϕ′ (0) < 0.                                                      p provides more flexibility to ∂ϕ. Figure 3 illustrates the
                                                                                                              rights tails of loss-derivatives for some widely-used loss
Theorem 3.1 effectively transfers the properties of con-                                                      functions. Intuitively, Lemma 3.2 essentially indicates that
vex calibration from ϕ to its loss-derivative ∂ϕ, offering a                                                  the right tail of a valid loss-derivative needs to rise rapidly
straightforward and convenient approach to validate, design                                                   from ϕ′ (0) < 0 towards zero, either surpassing zero (as in
and implement a convex calibrated loss or loss-derivative                                                     the case of squared loss), or vanishing faster than 1/z when
under SGD implementation.                                                                                     z is large (ignoring the logarithm). We refer to this condition
                                                                                                              in Lemma 3.2 as a superlinear raising-tailed loss-derivative.
3.2. Superlinear raising-tail
                                                                                                              We now present all the conditions for the loss-derivative of
Notably, there is one condition that could be easily over-                                                    a bounded below convex calibrated loss. Convexity implies
looked yet remains crucial: the surrogate loss function ϕ                                                     that the loss-derivative is nondecreasing, while calibration
must be nonnegative or bounded below (since we can al-                                                        requires the loss to be differentiable at 0 with ϕ′ (0) < 0.
ways add a constant to make it a nonnegative loss, without                                                    Additionally, the bounded below assumption yields that the
affecting the optimization). Its importance lies in two-folds.                                                loss-derivative exhibits a superlinear raising-tail. We re-
Firstly, it directly influences calibration: the bounded be-                                                  fer this particular form of loss-derivatives as superlinear
low condition is a necessary condition of calibration, see                                                    raising-tailed calibrated (RC) loss-derivatives. The follow-

                                                                                                      4
                                                     E NS L OSS: Stochastic Calibrated Loss Ensembles

        2.0         name                                                         Algorithm 1 (Minibatch) Calibrated ensemble SGD.
                    exp                                                           1: Input: a train set D = (xi , yi )n
                    hinge                                                                                             i=1 , a minibatch size B;
        1.5         logistic                                                      2: Initialize θ.
                    square                                                        3: for number of epoches do
        1.0                                                                       4:    /*     Minibatch sampling */
                                                                                  5:    Sample a minibatch from D without replacement:
        0.5
 grad




                                                                                        B = {(xi1 , yi1 ), · · · , (xiB , yiB )}.
                                                                                  6:    Compute z = (z1 , · · · , zB )⊺ , where zb = yib fθ (xib )
        0.0
                                                                                        for b = 1, · · · , B.
        0.5                                                                       7:    /*     Generate random RC loss-derivs */
                                                                 1/z              8:    /*     calibration and convexity */
                                                                                                                                           iid
        1.0                                                                       9:    Generate g = (g1 , · · · , gB )⊺ , where gb ∼ −ξ,
              1.0              1.2   1.4       1.6         1.8         2.0              where ξ is a positive random variable (accomplished
                                           z
                                                                                        through Algorithm 2)
Figure 3. Plot of loss-derivatives of existing losses when z > 1.                10:    Sort z and g decreasingly, that is
Conclusion. Lemma 3.2 essentially indicates that the right tail of
the loss-derivatives needs to rise rapidly from ϕ′ (0) < 0 towards                           zπ(1) > · · · > zπ(B) ,   gσ(1) > · · · > gσ(B) ;
zero, either surpassing zero (as in the case of squared loss) or
vanishing faster than 1/z when z is large (ignoring the logarithm).              11:    (the derivative corresponding to zb is gσ(π−1 (b)) ).
                                                                                 12:    /*     bounded below */
ing lemma indicates that RC loss-derivatives essentially                         13:    For b = 1, · · · , B,
correspond to a bounded below convex calibrated loss.
                                                                                               gσ(π−1 (b)) ← gσ(π−1 (b)) /zb ,    if zb > 1.
Lemma 3.3. Given a set of samples (xi , yi )i=1,··· ,B and a
classification function f , let zi = yi f (xi ), and denote g =                  14:    /*     Update parameters */
(g1 , · · · , gB )⊺ as RC loss-derivatives, that is, satisfying the              15:    Compute gradients and update
following conditions:
                                                                                                                B
                                                                                                          γ X
  1. (Convexity) gi ≤ gj if zi < zj , and gi = gj if zi = zj ;                                 θ←θ−           yib gσ(π−1 (b)) ∇θ fθ (xib )
                                                                                                          B
  2. (Calibration) gi < 0 if zi ≤ 0;                                                                            b=1

  3. (Superlinear) zip gi ≤ zjp gj if 1 ≤ zi < zj , for p > 1.                   16: end for
                                                                                 17: Return the estimated θ
Then, there exists a bounded below convex calibrated loss
function ϕ, such that ∂ϕ(zi ) = gi for all i = 1, · · · , B.

Lemma 3.3 sheds light upon the conditions for RC loss-                           loss-derivatives by sampling from a positive random vari-
derivatives (or its implicitly corresponding CC loss). Hence,                    able ξ, then sorting and rescaling. Specifically, in Algorithm
it allows us to bypass the generation of loss and directly gen-                  11 , the lines 8 to 11 (sampling and sorting) are dedicated to
erate the loss-derivatives in SGD, thereby inspires doubly                       satisfy Conditions 1 and 2; the line 13 (rescaling) is for Con-
stochastic gradients in Algorithm 1.                                             dition 3. This implementation approach, which builds upon
                                                                                 stochastic gradients by adding an another level of “stochas-
Given that Conditions 1 and 3 require at least two samples
                                                                                 ticity”, is thus referred to as doubly stochastic gradients.
to demonstrate the properties, our primarily focus on imple-
menting our algorithm using mini-batch SGD. For sake of                          Note that Algorithm 1 does not explicitly implement Con-
simplicity in implementation, we directly choose p = 1, as                       dition 2. In fact, for simplicity, we consider a sufficient
the numerical difference between z and z p when p is very                        condition that gi < 0 for all i = 1, · · · , B. This adapta-
close to 1 is exceedingly tiny. Our empirical experiments                        tion, made only for implementation simplicity, does not
also demonstrate that p = 1 does not significantly affect the                    fundamentally alter the framework inspired by Lemma 3.3.
performance compared with p close to 1, yet not performing                       Furthermore, the choice of the positive random variable ξ
superlinear raising tail adjustment on loss-derivatives can                      impacts the diversity of the random loss-derivatives. To
significantly impact the performance.                                            address this, we propose Algorithm 2 to generate distribu-
                                                                                 tion of ξ using the inverse Box-Cox transformation (see
Doubly stochastic gradients. The most important impli-
                                                                                 discussion in Appendix A).
cation of Lemma 3.3 is that it provides a guideline for gen-
erating RC loss-derivatives, as Conditions 1-3 are straight-                        1
                                                                                      We assume zi ̸= zj , otherwise we can duplicate the derivative
forward to satisfy. For example, we can obtain a set of RC                       by merging and treating them as one sample.

                                                                             5
                                         E NS L OSS: Stochastic Calibrated Loss Ensembles

3.3. Enhance loss diversity via the inverse Box-Cox                     Algorithm 2 Inverse Box-Cox transform of loss-derivatives.
     transformation                                                      1: Input: a minibatch size B, a hyperparameter λ (default
                                                                            λ = 0)
In addition to considering the RC regularity and stochastic
                                                                         2: /* Generate normal grad */
generating of loss-derivatives, it is also interesting to further                                                       iid
boost the diversity of the loss functions or loss-derivatives            3: Generate g = (g1 , · · · , gB )⊺ , where gb ∼ N (0, 1)
generated from our proposed method (Algorithm 1). This                   4: /* Inverse Box-Cox transformation */
could potentially improve the performance of loss ensem-
                                                                                               gb ← −invBCλ (gb )
bles, based on previous experience with ensemble learning
(Breiman, 1996; 2001; Wood et al., 2023).                                5: Return         the generated   loss-derivatives   g      =
In fact, the diversity of loss functions in Algorithm 1 is partly           (g1 , · · · , gB )⊺ .
associated with the loss-derivatives generated from the vari-
ety of positive random distributions. Consequently, a crucial
consideration is to generate a sufficiently diverse range of            3.4. Statistical consistency of loss ensembles
positive random distributions. This naturally invokes the               In this section, we establish a theoretical framework to ana-
concept of the Box-Cox transformation (Box & Cox, 1964),                lyze the statistical behavior and consistency of the proposed
which transforms (any) positive data via a power transfor-              loss ensemble framework. Our idea comprises two primary
mation with a hyperparameter λ such that the transformed                steps: first, aligning the proposed method with a novel risk
data closely approximates a normal distribution.                        function; second, leveraging learning theory to evaluate the
                       
                           −1 λ
                                                                        calibration and consistency of the risk function.
                       λ (ξ − 1), if λ ̸= 0,
                       
          BCλ (ξ) =                                                     To proceed, we introduce relevant definitions to construct
                                                                       the corresponding risk function for the proposed method.
                         log(ξ),           if λ = 0.
                       
                                                                        Specifically, we denote L as a measurable space consisting
                                                                        of bounded below convex calibrated (BCC) losses. A ran-
Interestingly, the Box-Cox transformation is to transform a
                                                                        dom surrogate loss Φ is considered as a L-valued random
diverse range of positive random distributions into a normal
                                                                        variable, where a loss ϕ represents an observation or sample
distribution. This represents our exact “inverse” direction:
                                                                        of Φ. Note that in our analysis, Φ is assumed independent of
we need to generate a sufficiently diverse range of positive
                                                                        (X, Y ); for detailed probabilistic definitions of random vari-
random distributions. Consequently, we propose the inverse
                                                                        ables in functional spaces, refer to (Mourier, 1953; Vakhania
Box-Cox transformation, defined as invBCλ (·) in (4).
                                                                        et al., 2012). On this ground, we introduce the calibrated
                               1/λ                                     ensemble risk function as follows:
                       (1 + λξ)+ ,
                                          if λ ̸= 0,
                                                                                                                      
       invBCλ (ξ) =                                          (4)                      R(f ) := EX,Y EΦ Φ Y f (X) ,                 (5)
                       
                           exp(ξ),         if λ = 0.
                       
                                                                        where EΦ is the expectation taken with respect to Φ. In
On this ground, the final loss-derivatives can be generated in          this content, given a classification function fθ , with a mini-
this manner, see Algorithm 2. First, we generate derivatives            batch data (xi , yi )i∈IB and the sampled loss Φ = ϕ, the
from a standard normal distribution, then using the inverse             stochastic gradient of R in SGD is defined as:
Box-Cox transformation (4) (with a random λ) transforms
                                                                                              1 X                 
them into an arbitrary positive random distribution. This                             b=
                                                                                      g           ∇θ ϕ yi fθ (xi ) .                 (6)
                                                                                            |IB |
guarantees a variety in the loss function during the ensemble                                    i∈IB
process over SGD. Here, the randomness of λ is used to
                                                                        Thus, the proposed method (Algorithm 1) can be regarded
control a diverse range of loss-derivatives.
                                                                        as the SGD updating based on g b, and R(·) is an appropriate
In our numerical experiments, we fix λ = 0 (no hyperpa-                 risk function for characterizing the proposed method.
rameter tuning) for a fair comparison, which corresponds
                                                                        Next, we discuss the loss space L. To ensure the calibration
to an exponential transformation of normally distributed
                                                                        of the proposed method, we require that L is a measurable
random variables. In practice, to further enhance loss di-
                                                                        subspace of the collection of all BCC losses:
versity, we can implement random sampling of λ every T
epochs. This approach presents beneficial in certain cases,                  L ⊂ ϕ is convex | inf ϕ(z) > −∞, ϕ′ (0) < 0 .
                                                                                  
as demonstrated in our ablation studies presented in Ta-                                           z

ble 6. However, determining a reasonable value of T in a                Assumption 3.4. Let (Ω, µ) be a probability space and L
straightforward manner likely requires further investigation            be a measurable space. Suppose Φ : Ω → L is a L-valued
in future research.                                                     random variable satisfies following conditions.

                                                                    6
                                       E NS L OSS: Stochastic Calibrated Loss Ensembles

  1. EΦ(z) exists and EΦ(z) < ∞ for any given z ∈ R.                 (Moulines & Bach, 2011; Shamir & Zhang, 2013; Fehrman
                                                                     et al., 2020; Garrigos & Gower, 2023). Given that the
  2. There exists a random variable U : Ω → R such that
                                                                     stochastic gradient g
                                                                                         b in (6) for the proposed method offers
     Φ(z) ≥ U a.s. for all z and EU > −∞;
                                                                     an unbiased estimate of ∇θ R(fθ ), many existing SGD con-
  3. There exist a random variable G : Ω → R and a                   vergence results can be extended to our ensemble setting,
     constant δ0 > 0, such that |∂Φ(δ)| ≤ G a.s. for any             ensuring that R(fn ) → inf f R(f ).
     δ ∈ [−δ0 , δ0 ] and EG < ∞.
                                                                     By combining the convergence results from SGD and the
Assumption 3.4 characterizes the feasibility of the loss space       calibration established in Theorem 3.6, we demonstrate that
L and probability measure µ, thereby establishing the scope          the proposed loss ensemble preserves statistical consistency
of applicability for our proposed method. Notably, a finite          for classification accuracy. We illustrate the usage of the
loss space automatically satisfies Assumption 3.4.                   theorem by a toy example in Example C.1 of Appendix C.
Lemma 3.5. If the loss space L is finite, then Assumption            The proposed method appears to have an analogous effect
3.4 is automatically satisfied.                                      to bagging (Bühlmann & Yu, 2002; Soloff et al., 2024).
                                                                     We next provide theoretical insights into a natural question:
Indeed, L can be extended to a more general functional               what advantages do loss ensembles offer over a fixed loss
space, subject to the mild uniform assumptions in Assump-            approach? We partially address this question by examining
tion 3.4, which are necessary to preserve the completeness           the Rademacher complexity. Specifically, given a classi-
of BCC properties. For example, limiting over L without              fication function space F, the Rademacher complexity of
uniform assumptions may violate the calibration condition.           ϕ-classification are defined as follows:
In practice, during SGD training, the number of epochs is
typically fixed, which implies that the number of ensemble                                           n
                                                                                                 1X                   
losses implemented is also fixed. As a result, our analy-                    Radϕ (F) := sup           τi ϕ Yi f (Xi ) ,
sis of the proposed method in practical scenarios can be                                    f ∈F n i=1
exclusively focused on a finite L case.
Now, we have aligned the proposed method with the pro-               where (τi )ni=1 are i.i.d. Rademacher random variables in-
posed ensemble risk (5). Hence, we can infer the statistical         dependent of (Xi , Yi )ni=1 . The Rademacher complexity
behavior of our method by analyzing R. Of primary require-           plays a crucial role in many existing concentration inequali-
ment is the calibration or Fisher-consistency, as formally           ties (Talagrand, 1996a;b; Bousquet, 2002), determining the
stated in the following theorem.                                     convergence rate of the excess risk (Bartlett & Mendelson,
                                                                     2002) (with smaller values yielding a faster rate). On this
Theorem 3.6 (Calibration). Suppose Assumption 3.4 holds,
                                                                     ground, the corresponding Rademacher complexity for the
and R(·) is defined as in (5) for any distributions PX,Y and
                                                                     proposed ensemble loss method can be formulated as:
PΦ , then for every sequence of measurable function fn ,
 R(fn ) → inf R(f )     implies that   R(fn ) → inf R(f ).                                      n
             f                                     f
                                                                                             1X                      
                                                                             Rad(F) := sup         τi EΦ Φ Yi f (Xi )
                                                           (7)                          f ∈F n i=1
Moreover, the excess risk bound is provided as:                                                      
                                                                                      ≤ EΦ RadΦ (F) ,                          (9)
       R(f ) − inf R(f ) ≤ ψ −1 R(f ) − inf R(f ) ,
                                                 
                                                           (8)
                 f                          f
                                                                     where the inequality follows from the Jensen’s inequality.
where ψ −1 is the inverse function of ψ, and ψ is defined as:        This simple deduction yields a positive result, that is, the
                                                                     Rademacher complexity of the ensemble loss is no worse
                     1+θ        1−θ      
ψ(θ) = E Φ(0) − inf E     Φ(α) +     Φ(−α) .                         than the average based on the set of fixed losses. Yet, (9)
                α∈R    2          2                                  only partially showcases potential benefits of loss ensemble,
                                                                     but it does not provide conclusive evidence of its superiority
Theorem 3.6 ensures the classification-calibration of the
                                                                     over fixed losses, as a comparison of their excess risk bounds
proposed method, indicating that minimizing the ensem-
                                                                     is also crucial. In fact, ensemble loss appears suboptimal in
ble calibrated risk R would provide a reasonable surrogate
                                                                     terms of distribution-free excess risk bounds. Furthermore,
for minimizing R(f ). Furthermore, the excess risk bound
                                                                     achieving definitive and practical conclusions across specific
is also provided in (8), which enables presenting the re-
                                                                     datasets or distributions remains a longstanding challenge
lationship between R(f ) − R∗ and R(f ) − R∗ when the
                                                                     for statistical analysis. The development of more effective
distribution of Φ is given.
                                                                     combining weights, as in ensemble learning (Yang, 2004;
In addition, there is a substantial amount of literature that        Audibert, 2004; Dalalyan & Tsybakov, 2007), may provide
discusses the convergence results based on (batch) SGD               a promising solution for future research.

                                                                 7
                                        E NS L OSS: Stochastic Calibrated Loss Ensembles

4. Experiments                                                         dence suggesting that A outperforms B. Pairwise hypothesis
                                                                       tests are performed for each pair of methods. If a method ex-
This section presents experiments comparing E NS L OSS                 hibits statistical significance compared to all other methods,
with fixed loss methods and assessing its compatibility with           it will be highlighted in bold font in the tables. Our primary
regularization methods. All Python codes is openly acces-              focus is on accuracy, but we also provide AUC results in our
sible at our G IT H UB. All experimental results, up to the            accompanying W&B projects and GitHub repository.
epoch level, are publicly available on our W&B projects
ENS L OSS - IMG and ENS L OSS - TAB , enabling transparent
                                                                       4.3. E NS L OSS vs fixed loss methods
and detailed tracking and analysis.
                                                                       This section presents our experimental results, wherein we
4.1. Datasets, models and losses                                       examine the numerical performance of E NS L OSS and com-
                                                                       pare it with other fixed loss methods across various setups.
Image datasets. We present the empirical results for image
benchmark datasets: the CIFAR10 (Krizhevsky et al., 2009)              Design. The experiment design is straightforward: we com-
and the PatchCamelyon (PCam; (Veeling et al., 2018)). CI-              pare various methods on 46 image datasets (including 45
FAR10 was originally designed for multiclass image classifi-           CIFAR2 datasets and the PCam dataset) and 14 OpenML
cation. In our study, we construct 45 binary CIFAR datasets,           tabular datasets and using different network architectures.
denoted as CIFAR2, by selecting all possible pairs of two              The implementation settings for each method are identical,
classes from CIFAR10, which enables the evaluation of our              with the only difference in loss functions.
method. PCam is a binary image classification dataset com-             Results. Due to space limitations, we only present the
prising 327,680 96x96 images from histopathologic scans of             summary statistics of significant testing results across all
lymph node sections, each annotated with a label indicating            datasets in Table 2 (for 14 tabular datasets) and Table 3
the presence or absence of metastatic tissue. CIFAR and                (for 45 CIFAR2 datasets). Moreover, some highlighting
PCam datasets are widely recognized benchmarks in image                detailed empirical results are provided in Appendix B, and
classification, frequently employed in various studies, such           all performance metrics for all experiments are publicly
as (He et al., 2016; Huang et al., 2017; Srinidhi et al., 2021).       accessible at the epoch level via our W&B projects.
Tabular datasets. We applied a filtering (n ≥ 1000, d ≥                Conclusion. The key findings are summarized as follows.
1000) across all OpenML (Vanschoren et al., 2014) binary
classification dense datasets, resulting 14 datasets: Biore-           Image data. Tables 9 - 10 and Figure 4 demonstrate that
sponse, guillermo, riccardo, christine, hiva-agnostic, and 9           E NS L OSS consistently outperforms existing fixed loss meth-
OVA datasets: Breast, Uterus, Ovary, Kidney, Lung, Omen-               ods. (i) The improvement is universal across experiments.
tum, Colon, Endometrium, and Prostate.                                 As shown in Table 9, E NS L OSS achieves non-inferior per-
                                                                       formance in all 45 CIFAR2 datasets, and significantly out-
Models. To assess the effectiveness of the proposed method,            performs ALL other methods in at least 60% of the datasets.
we explore a range of commonly used neural network struc-              (ii) The improvement is remarkable, with substantial gains
tures, including Multilayer Perceptrons (MLPs; (Hinton,                of 3.84% and 3.79% observed in CIFAR2 (cat-dog) and
1990)) with varying depths for tabular data, as well as VGG            PCam, respectively, surpassing the best fixed loss method
(Simonyan & Zisserman, 2014), ResNet (He et al., 2016),                paired with the optimal network architecture.
and MobileNet (Sandler et al., 2018) for image data.
                                                                       Tabular data. Table 11 reveals that: (i) When dealing with
Fixed losses. E NS L OSS is benchmarked against with the               overparameterized models, E NS L OSS tends to be a more
ERM framework (2) using three widely adopted fixed classi-             desirable option compared to fixed losses, whereas for less
fication losses: the logistic loss (BCE; binary cross entropy),        complex models, E NS L OSS may underperform or outper-
the hinge loss (H INGE), and the exponential loss (E XP).              form on certain datasets compared to the optimal fixed loss,
                                                                       yet it remains a viable alternative worth considering overall.
4.2. Evaluation                                                        (ii) The effectiveness of E NS L OSS exhibits a clear upward
All experiments are replicated 5 (for image data) or 10 (for           trend as model complexity increases, as evident from the
tabular data) times, and the resulting accuracy values are             performance comparison from MLP(1) to MLP(5).
reported. Moreover, to evaluate the statistical significance,          The superiority of E NS L OSS is more pronounced in image
p-values are calculated using a one-tailed paired sample               data than in tabular data, likely attributable to the increased
t-test, with the null and alternative hypotheses defined as:           risk of overfitting associated in high-dimensional inputs and
     H0 : AccA ≤ AccB ,        H1 : AccA > AccB ,          (10)        complex models characteristic of image datasets.

where AccA and AccB are accuracies provided by two com-                The improvement is also prominently reflected at the epoch
pared methods. A p-value of ≤ 0.05 indicates strong evi-               level, particularly after the training accuracy for the pro-

                                                                   8
                                            E NS L OSS: Stochastic Calibrated Loss Ensembles

posed E NS L OSS reaches or approaches one, as suggested
                                                                         Table 4. The averaged accuracy (with AUC included in our Github
by the epoch-vs-test accuracy curves in Figure 1 (and those
                                                                         repository, exhibiting similar patterns) and their standard errors (in
for all experiments in our W&B projects). This is crucial                parentheses) for all methods with various regularization on the
for practitioners: by specifying a relatively large number of            CIFAR2 (cat-dog) image dataset are presented. “HP” indicates
epochs, E NS L OSS is a promising choice compared to fixed               the corresponding hyperparameter for each regularization method.
loss methods; furthermore, its training accuracy can some-                 R EG        HP     BCE           E XP          H INGE        E NS L OSS
times serve as a key indicator for early-stopping, obviating
                                                                           NO REG ;
the need of a validation set.                                             baseline     —      67.99(0.30)   60.09(0.19)   68.19(0.40)   69.52(1.38)
                                                                           W EIGHT D   5e-5   67.64(0.14)   60.43(0.23)   68.26(0.65)   71.01(1.04)
Table 2. The summary statistics of datasets exhibiting statistical                     5e-4   67.59(0.35)   61.57(0.56)   67.57(0.28)   72.04(0.35)
significance when comparing the proposed E NS L OSS against                            5e-3   68.00(0.31)   62.26(0.45)   68.26(0.35)   70.84(0.67)
all other fixed loss methods in 45 CIFAR2 binary classification            D ROPOUT    0.1    67.50(0.39)   60.70(0.34)   67.89(0.30)   72.48(0.22)
datasets (provided by pairwise labels subset of CIFAR10) are pre-                      0.2    68.13(0.54)   60.02(0.52)   67.78(0.44)   70.08(1.28)
                                                                                       0.3    67.65(0.29)   59.70(0.46)   67.78(0.49)   72.44(0.68)
sented. The significance of “better”, “no diff”, and “worse” are
suggested by the significance test, as described in Section 4.2.           DATA AUG    —      79.22(0.12)   58.96(0.31)   80.47(0.26)   83.00(0.25)

      (E NS L OSS)     (vs BCE) (vs E XP) (vs H INGE)
      M ODELS          (better, no diff, worse) with p < 0.05
      ResNet34         (41, 4, 0)    (45, 0, 0)    (36, 9, 0)            benefits in mitigating overfitting. Moreover, the advantages
      ResNet50         (42, 3, 0)    (45, 0, 0)    (43, 2, 0)            of E NS L OSS is further demonstrated by its consistent su-
      ResNet101        (39, 6, 0)    (45, 0, 0)    (40, 5, 0)
                                                                         perior performance compared to other fixed losses, even
      VGG16            (36, 9, 0)    (45, 0, 0)   (29, 16, 0)
      VGG19            (36, 9, 0)    (45, 0, 0)   (27, 18, 0)            with additional regularization methods. Another benefit of
      MobileNet        (45, 0, 0)    (45, 0, 0)    (44, 1, 0)            E NS L OSS is its relative insensitivity from time-consuming
      MobileNetV2      (45, 0, 0)    (45, 0, 0)    (45, 0, 0)            hyperparameter tuning, as a simple strategy of setting a
                                                                         large epoch often yields improved performance.
Table 3. The summary statistics of datasets exhibiting statistical
significance when comparing the proposed E NS L OSS against all          5. Conclusion
other fixed loss methods in 14 OpenML datasets are presented.
       (E NS L OSS)   (vs BCE) (vs E XP) (vs H INGE)                     E NS L OSS is a framework designed to enhance ML per-
       M ODELS        (better, no diff, worse) with p < 0.05             formance by mitigating overfitting. The proposed method
       MLP(1)          (9, 4, 1)     (7, 5, 2)     (5, 4, 5)
                                                                         has shown potential to improve performance across a wide
       MLP(3)          (7, 7, 0)     (8, 5, 1)     (9, 3, 2)             variety of datasets and models, particularly for overparame-
       MLP(5)         (11, 3, 0)    (11, 2, 1)    (13, 0, 1)             terized models. The primary motivation behind consists of
                                                                         two components: “ensemble” and the “calibration” of the
                                                                         loss functions. Therefore, this concept can be extensively
4.4. Compatibility of prevent-overfitting methods                        applied to various ML problems, by identify the specific con-
                                                                         ditions for loss consistency or calibration. Fortunately, some
As discussed in Section 2, the proposed E NS L OSS comple-
                                                                         consistency conditions have been extensively studied in the
ments most existing prevent-overfitting methods, suggesting
                                                                         literature, including Section 4 in (Zhang, 2004a), Theorem
the potential for their simultaneous use. In this experiment,
                                                                         1 in (Zou et al., 2008), gamma-phi losses in (Wang & Scott,
we empirically investigate the compatibility of E NS L OSS
                                                                         2023), Theorem 7 in (Tewari & Bartlett, 2007) and encoding
with widely used regularization methods: DROPOUT, L2-
                                                                         methods in (Lee et al., 2004) for multi-class classification,
regularization (or equivalently weight decay, denoted as
                                                                         Theorem 2 in (Gao & Zhou, 2015) for bipartite ranking or
W EIGHT D), and data augmentation (DATA AUG; (Wong
                                                                         AUC optimization, and Theorem 3.4 in (Scott, 2012) for
et al., 2016; Xu et al., 2016)).
                                                                         asymmetric classification. In addition, new discussions re-
Design and results. To illustrate the compatibility, we                  garding consistency, such as H-consistency (Awasthi et al.,
conduct on the CIFAR-2 (cat-dog) dataset and ResNet50,                   2022), would also be intriguing in the context of ensembles
using the same experimental setup as the main experiment.                with specific functional spaces.
Specifically, we compare the performance of E NS L OSS
                                                                         A limitation of E NS L OSS is that it often requires more
with fixed losses under various regularization methods, and
                                                                         epochs to achieve stable training (see Table 8), resulting
the results are presented in Table 4, which illustrates their
                                                                         in longer training times. This issue is also seen in stochas-
compatibility and effectiveness in preventing overfitting.
                                                                         tic regularization methods like Dropout. Additionally, the
Conclusion. According to Table 4, our prior hypothesis                   selection of the positive random variable ξ during random
is confirmed: E NS L OSS is compatible with other regular-               loss-derivative generation, currently done using the inverse
ization methods, and their combination yields additional                 Box-Cox transformation, needs further investigation.

                                                                     9
                                       E NS L OSS: Stochastic Calibrated Loss Ensembles

Acknowledgements                                                       Breiman, L. Random forests. Machine Learning, 45:5–32,
                                                                         2001.
We thank the anonymous Area Chair and some reviewers
for their valuable feedback, suggestions and support. This             Bühlmann, P. and Yu, B. Analyzing bagging. Annals of
work was supported by the Hong Kong RGC-ECS Grant                        Statistics, 30(4):927–961, 2002.
24302422 and Hong Kong RGC Grant 14304823.
                                                                       Cortes, C. and Vapnik, V. Support-vector networks. Ma-
                                                                         chine Learning, 20:273–297, 1995.
Impact Statement
                                                                       Cox, D. R. The regression analysis of binary sequences.
This paper presents work whose goal is to advance the field
                                                                         Journal of the Royal Statistical Society Series B: Statisti-
of Machine Learning. There are many potential societal
                                                                         cal Methodology, 20(2):215–232, 1958.
consequences of our work, none of which we feel must be
specifically highlighted here.                                         Dalalyan, A. S. and Tsybakov, A. B. Aggregation by expo-
                                                                         nential weighting and sharp oracle inequalities. In Inter-
References                                                               national Conference on Computational Learning Theory,
                                                                         pp. 97–111. Springer, 2007.
Aronszajn, N. Theory of reproducing kernels. Transactions
  of the American Mathematical Society, 68(3):337–404,                 Evans, L. Measure Theory and Fine Properties of Functions.
  1950.                                                                  Routledge, 2018.

Audibert, J.-Y. Aggregated estimators and empirical com-               Fehrman, B., Gess, B., and Jentzen, A. Convergence rates
  plexity for least square regression. In Annales de l’IHP               for the stochastic gradient descent method for non-convex
 Probabilités et Statistiques, volume 40, pp. 685–736,                  objective functions. Journal of Machine Learning Re-
  2004.                                                                  search, 21(136):1–48, 2020.

Awasthi, P., Mao, A., Mohri, M., and Zhong, Y. H-                      Finn, C., Abbeel, P., and Levine, S. Model-agnostic meta-
 consistency bounds for surrogate loss minimizers. In                    learning for fast adaptation of deep networks. In Interna-
 International Conference on Machine Learning, pp. 1117–                 tional Conference on Machine Learning, pp. 1126–1135.
 1174. PMLR, 2022.                                                       PMLR, 2017.

Bartlett, P. L. and Mendelson, S. Rademacher and gaussian              Freund, Y. and Schapire, R. E. A desicion-theoretic general-
  complexities: Risk bounds and structural results. Journal              ization of on-line learning and an application to boosting.
  of Machine Learning Research, 3(Nov):463–482, 2002.                    In European Conference on Computational Learning The-
                                                                         ory, pp. 23–37. Springer, 1995.
Bartlett, P. L., Jordan, M. I., and McAuliffe, J. D. Convexity,
  classification, and risk bounds. Journal of the American             Gao, B., Gouk, H., Yang, Y., and Hospedales, T. Loss
  Statistical Association, 101(473):138–156, 2006.                       function learning for domain generalization by implicit
                                                                         gradient. In International Conference on Machine Learn-
Bechtle, S., Molchanov, A., Chebotar, Y., Grefenstette, E.,              ing, pp. 7002–7016. PMLR, 2022.
  Righetti, L., Sukhatme, G., and Meier, F. Meta learning
  via learned loss. In 2020 25th International Conference              Gao, W. and Zhou, Z.-H. On the consistency of auc pair-
  on Pattern Recognition (ICPR), pp. 4161–4168. IEEE,                    wise optimization. In Proceedings of the Twenty-Fourth
  2021.                                                                  International Joint Conference on Artificial Intelligence,
                                                                         pp. 939–945, 2015.
Bottou, L. Online algorithms and stochastic approximations.
  Online Learning in Neural Networks, 1998.                            Garrigos, G. and Gower, R. M. Handbook of conver-
                                                                         gence theorems for (stochastic) gradient methods. arXiv
Bousquet, O. A bennett concentration inequality and its                  preprint arXiv:2301.11235, 2023.
  application to suprema of empirical processes. Comptes
  Rendus Mathematique, 334(6):495–500, 2002.                           Gonzalez, S. and Miikkulainen, R. Optimizing loss func-
                                                                         tions through multi-variate taylor polynomial parameteri-
Box, G. E. and Cox, D. R. An analysis of transformations.                zation. In Proceedings of the Genetic and Evolutionary
  Journal of the Royal Statistical Society Series B: Statisti-          Computation Conference, pp. 305–313, 2021.
  cal Methodology, 26(2):211–243, 1964.
                                                                       Goodfellow, I., Bengio, Y., and Courville, A. Deep
Breiman, L. Bagging predictors. Machine Learning, 24:                   Learning.      MIT Press, 2016.      http://www.
  123–140, 1996.                                                         deeplearningbook.org.

                                                                  10
                                       E NS L OSS: Stochastic Calibrated Loss Ensembles

Hastie, T., Rosset, S., Zhu, J., and Zou, H. Multi-class              Loshchilov, I. and Hutter, F. Decoupled weight decay regu-
  adaboost. Statistics and its Interface, 2(3):349–360, 2009.           larization. arXiv preprint arXiv:1711.05101, 2017.

He, K., Zhang, X., Ren, S., and Sun, J. Deep residual learn-          Lugosi, G. and Vayatis, N. On the bayes-risk consistency of
  ing for image recognition. In Proceedings of the IEEE                 regularized boosting methods. Annals of Statistics, 32(1):
  Conference on Computer Vision and Pattern Recognition,                30–55, 2004.
  pp. 770–778, 2016.                                                  Moulines, E. and Bach, F. Non-asymptotic analysis of
Hinton, G. E. Connectionist learning procedures. In Ma-                stochastic approximation algorithms for machine learning.
  chine Learning, pp. 555–610. Elsevier, 1990.                         Advances in Neural Information Processing Systems, 24,
                                                                       2011.
Hiriart-Urruty, J.-B. and Lemaréchal, C. Convex Analysis             Mourier, E. Eléments aléatoires dans un espace de banach.
  and Minimization Algorithms I: Fundamentals, volume                  In Annales de l’institut Henri Poincaré, volume 13, pp.
  305. Springer science & business media, 1996.                        161–244, 1953.
Hoerl, A. E. and Kennard, R. W. Ridge regression: Biased              Raymond, C. Meta-learning loss functions for deep neural
  estimation for nonorthogonal problems. Technometrics,                 networks. arXiv preprint arXiv:2406.09713, 2024.
 12(1):55–67, 1970.
                                                                      Sandler, M., Howard, A., Zhu, M., Zhmoginov, A., and
Huang, G., Liu, Z., Van Der Maaten, L., and Weinberger,                 Chen, L.-C. Mobilenetv2: Inverted residuals and linear
  K. Q. Densely connected convolutional networks. In                    bottlenecks. In Proceedings of the IEEE Conference
 Proceedings of the IEEE Conference on Computer Vision                  on Computer Vision and Pattern Recognition, pp. 4510–
  and Pattern Recognition, pp. 4700–4708, 2017.                         4520, 2018.

Krizhevsky, A., Hinton, G., et al. Learning multiple layers           Scott, C. Calibrated asymmetric surrogate losses. Electronic
  of features from tiny images. Toronto, ON, Canada, 2009.              Journal of Statistics, 6:958–992, 2012.

Krizhevsky, A., Sutskever, I., and Hinton, G. E. Imagenet             Shamir, O. and Zhang, T. Stochastic gradient descent for
  classification with deep convolutional neural networks.               non-smooth optimization: Convergence results and opti-
  Advances in Neural Information Processing Systems, 25,                mal averaging schemes. In International Conference on
  2012.                                                                 Machine Learning, pp. 71–79. PMLR, 2013.
                                                                      Simonyan, K. and Zisserman, A. Very deep convolu-
LeCun, Y., Bottou, L., Orr, G. B., and Müller, K.-R. Effi-             tional networks for large-scale image recognition. arXiv
  cient backprop. In Neural Networks: Tricks of the Trade,              preprint arXiv:1409.1556, 2014.
  pp. 9–50. Springer, 2002.
                                                                      Soloff, J. A., Barber, R. F., and Willett, R. Bagging provides
LeCun, Y., Bengio, Y., and Hinton, G. Deep learning. Na-                assumption-free stability. Journal of Machine Learning
  ture, 521(7553):436–444, 2015.                                        Research, 25(131):1–35, 2024.
Lee, Y., Lin, Y., and Wahba, G. Multicategory support vector          Srinidhi, C. L., Ciga, O., and Martel, A. L. Deep neural
  machines: Theory and application to the classification of             network models for computational histopathology: A
  microarray data and satellite radiance data. Journal of the           survey. Medical Image Analysis, 67:101813, 2021.
  American Statistical Association, 99(465):67–81, 2004.
                                                                      Srivastava, N., Hinton, G., Krizhevsky, A., Sutskever, I.,
Leng, Z., Tan, M., Liu, C., Cubuk, E. D., Shi, X., Cheng,               and Salakhutdinov, R. Dropout: a simple way to prevent
  S., and Anguelov, D. Polyloss: A polynomial expansion                 neural networks from overfitting. Journal of Machine
  perspective of classification loss functions. arXiv preprint          Learning Research, 15(1):1929–1958, 2014.
  arXiv:2204.12511, 2022.                                             Talagrand, M. New concentration inequalities in prod-
Lin, T.-Y., Goyal, P., Girshick, R., He, K., and Dollár, P.            uct spaces. Inventiones Mathematicae, 126(3):505–563,
  Focal loss for dense object detection. In Proceedings of              1996a.
  the IEEE International Conference on Computer Vision,               Talagrand, M. A new look at independence. Annals of
  pp. 2980–2988, 2017.                                                  Probability, pp. 1–34, 1996b.
Lin, Y. A note on margin-based loss functions in classi-              Tewari, A. and Bartlett, P. L. On the consistency of multi-
  fication. Statistics & probability letters, 68(1):73–82,              class classification methods. Journal of Machine Learn-
  2004.                                                                 ing Research, 8(5), 2007.

                                                                 11
                                       E NS L OSS: Stochastic Calibrated Loss Ensembles

Tibshirani, R. Regression shrinkage and selection via the              Zhang, T. Statistical behavior and consistency of classifica-
  lasso. Journal of the Royal Statistical Society Series B:              tion methods based on convex risk minimization. Annals
  Statistical Methodology, 58(1):267–288, 1996.                          of Statistics, 32(1):56–85, 2004b.

Vakhania, N., Tarieladze, V., and Chobanyan, S. Probability            Zou, H. and Hastie, T. Regularization and variable selection
  distributions on Banach spaces, volume 14. Springer                    via the elastic net. Journal of the Royal Statistical Society
  Science & Business Media, 2012.                                        Series B: Statistical Methodology, 67(2):301–320, 2005.

Vanschoren, J., Van Rijn, J. N., Bischl, B., and Torgo, L.             Zou, H., Zhu, J., and Hastie, T. New multicategory boost-
  Openml: networked science in machine learning. ACM                     ing algorithms based on multicategory fisher-consistent
  SIGKDD Explorations Newsletter, 15(2):49–60, 2014.                     losses. Annals of Applied Statistics, 2(4):1290, 2008.

Vaswani, A. Attention is all you need. Advances in Neural
  Information Processing Systems, 2017.

Veeling, B. S., Linmans, J., Winkens, J., Cohen, T., and
  Welling, M. Rotation equivariant CNNs for digital pathol-
  ogy. June 2018.

Wahba, G. An introduction to reproducing kernel hilbert
 spaces and why they are so useful. In Proceedings of the
 13th IFAC Symposium on System Identification (SYSID
 2003), pp. 525–528, 2003.

Wang, Y. and Scott, C. On classification-calibration of
 gamma-phi losses. In The Thirty Sixth Annual Conference
 on Learning Theory, pp. 4929–4951. PMLR, 2023.

Wolpert, D. H. Stacked generalization. Neural Networks, 5
 (2):241–259, 1992.

Wong, S. C., Gatt, A., Stamatescu, V., and McDonnell, M. D.
 Understanding data augmentation for classification: when
 to warp? In 2016 International Conference on Digital
 Image Computing: Techniques and Applications (DICTA),
 pp. 1–6. IEEE, 2016.

Wood, D., Mu, T., Webb, A. M., Reeve, H. W., Lujan, M.,
 and Brown, G. A unified theory of diversity in ensemble
 learning. Journal of Machine Learning Research, 24
 (359):1–49, 2023.

Xu, Y., Jia, R., Mou, L., Li, G., Chen, Y., Lu, Y., and Jin, Z.
  Improved relation classification by deep recurrent neural
  networks with data augmentation. In Proceedings of COL-
  ING 2016, the 26th International Conference on Compu-
  tational Linguistics: Technical Papers, pp. 1461–1470.
  The COLING 2016 Organizing Committee, December
  2016.

Yang, Y. Combining forecasting procedures: some theoreti-
  cal results. Econometric Theory, 20(1):176–222, 2004.

Zhang, T. Statistical analysis of some multi-category large
  margin classification methods. Journal of Machine Learn-
  ing Research, 5(Oct):1225–1251, 2004a.

                                                                  12
                                         E NS L OSS: Stochastic Calibrated Loss Ensembles

A. Ablation studies
The necessity of the bounded below condition. The bounded below condition is an important yet easily overlooked
condition. Here, we present ablation studies to demonstrate its significance. Our experimental setup is straightforward—we
simply remove the superlinear raising-tail condition induced by the bounded below condition (Line 13 in Algorithm 1).
Table 5 presents typical training and test performance metrics at 20-epoch intervals for CIFAR2 (dog-cat) using VGG16,
comparing models with and without this condition. Similar patterns are consistently observed across all datasets and network
architectures.

            epoch              20        40        60       80            100      120       140       160        180   200
            w/o B-below
            Train Acc        0.498     0.503     0.499     0.498      0.491     0.499       0.501      0.506   0.502    0.502
            Test Acc         0.488     0.508     0.507     0.495      0.508     0.488       0.507      0.491   0.492    0.493
            w/ B-below
            Train Acc        0.961     1.000     1.000     1.000      1.000     1.000       1.000      1.000   1.000    1.000
            Test Acc         0.741     0.826     0.827     0.827      0.827     0.827       0.829      0.827   0.826    0.828

Table 5. Comparison of training and testing accuracy with and without the bounded below (B-below) condition across different epochs.
The results indicate that the absence of the bounded below condition leads to model fail to learn.

According to Table 5, without the bounded below condition, the model fails to learn, achieving only random-level
performance (∼50% accuracy) throughout training. In contrast, with the bounded below condition implemented, the model
achieves high training accuracy (100%) and demonstrates good generalization with approximately 83% test accuracy.
From a loss-derivative perspective, the explanation is straightforward: Line 13 implements a superlinear loss-derivative
that effectively discounts gradients for correctly classified samples (z = yf (x) > 1). This focuses optimization efforts on
misclassified or boundary samples, a common design principle in classification loss functions.
When this condition (Line 13) is reflected into a loss function as a boundedness below constraint, the result is somewhat
counterintuitive and unexpected. However, within the framework of convexity and calibration, the boundedness below
condition appears to take on additional significance: Lemma 3.2 suggests that this condition provides essential regularity
for the right tail of the loss-derivative. Additionally, in the Appendix D, we provide a more comprehensive theoretical
investigation of the importance of the bounded below condition for loss calibration.

Randomly updating the inverse Box-Cox transformation. The performance of E NS L OSS, based on ResNet50 and
CIFAR2 datasets, with varying values of T , is presented in Table 6, under the same experimental setting as described in
Section 4.3.

                         DATASETS                 fixed λ = 0
                                               (used in Section 4)        T = 10          T = 20         T = 50
                        CIFAR2 (cat-dog)          70.04(1.21)         70.87(0.72)        71.48(0.62)   70.22(1.11)
                        CIFAR2 (bird-cat)         81.12(0.28)         80.45(0.30)        80.58(0.38)   80.63(0.47)
                        CIFAR2 (cat-deer)         83.11(0.29)         83.05(0.12)        82.82(0.25)   83.47(0.15)

Table 6. The averaged classification Accuracy and their standard errors (in parentheses), for different periods T of randomly updating
inverse Box-Cox transformation based on ResNet50 are reported for CIFAR2 datasets.

These preliminary experiments suggest that randomly updating λ over epochs can be beneficial in certain cases; however, the
effects are not particularly significant, and identifying the optimal value for this tuning parameter seems challenging. Conse-
quently, we implement experiments in Section 4 with a fixed λ = 0, which corresponds to an exponential transformation of
normally distributed random variables, and defer further investigation of this topic for future research.

Baseline of post-ensemble over fixed losses. We supplement our comparison by evaluating our approach against baselines
of post-ensembling fixed losses. For illustration, we report test performance for model averaging (AVERAGE) and majority

                                                                     13
                                            E NS L OSS: Stochastic Calibrated Loss Ensembles

                                BCE             EXP           H INGE       AVERAGE           VOTING            E NS L OSS
                 (Acc)       67.53 (1.05)    67.30 (0.38)   67.90 (1.33)   70.61 (1.09)    69.67 (1.59)    72.37 (1.04)
                 (AUC)       74.31 (0.73)    73.94 (0.75)   74.39 (0.93)   77.63 (0.37)        —           79.81 (1.14)

Table 7. The averaged classification Accuracy and AUC and their standard errors (in parentheses) of model combination methods in the
image dataset CIFAR2 (cat-dog) based on ResNet50 are presented. Bold font is used to denote statistical significant improvements over
ALL other competitors.


voting (VOTING) on CIFAR2 (dog-cat) using ResNet50 trained with three fixed losses. Similar patterns are observed across
all datasets and network architectures. The results are presented in Table 7.
As shown, post-ensembling indeed improves single fixed loss methods, but the proposed E NS L OSS still performs better. The
challenge with post-ensembling is that selecting too many fixed losses requires substantial computational costs of training,
while combining too few losses produces less effect. A key advantage of E NS L OSS is that it requires only a single model
training. Therefore, E NS L OSS differs from post-ensembling methods in practical application.

B. Highlighting empirical results
In this section, we highlight some detailed empirical results of our proposed method, E NS L OSS, and compare it with other
fixed loss methods on various image and tabular datasets. All detailed performance metrics for all experiments are publicly
accessible at the epoch level via our Github repository and W&B projects.
Training time comparison. To more accurately compare the computational differences between E NS L OSS and fixed loss
training, we provide detailed time comparisons between BCE, Hinge, and E NS L OSS in Table 8. Specifically, we report the
minimum number of epochs required for training accuracy to stabilize (defined as remaining within an error margin of 0.005
thereafter) across different neural network architectures on the CIFAR2 (cat-dog) dataset.

                Loss          MobileNet      MobileNetV2     ResNet101     ResNet34       ResNet50    VGG16         VGG19
                BCE               90              80              80           70            45           15          45
                H INGE             40             35              60           25            35           25           35
                E NS L OSS        110             90             160          145           150           55          150

Table 8. Comparison of minimum epochs required for training accuracy to stabilize (within an error margin of 0.005) across different
neural network architectures on the CIFAR2 (cat-dog) dataset.

As indicated in Table 8, E NS L OSS training typically requires 2-3 times more epochs than traditional BCE or Hinge loss
training to stabilize the training procedure. This computational overhead is acceptable for practical applications, and we are
actively exploring methods to reduce the training time in future work.
Performance on CIFAR2 datasets. Figure 4 illustrates the overall pattern of performance of all methods in 45 CIFAR2
binary classification datasets. Table 9 presents the performance results (accuracy and AUC values) for a representative single
CIFAR2 dataset (CIFAR2 (cat-dog)). Additional detailed results for other network architectures and datasets available in our
accompanying W&B projects and GitHub repository.
Performance on PCam dataset. Table 10 presents the performance results (accuracy and AUC values) for the PCam
dataset for all different network architectures.
Performance on OpenML datasets. Table 11 presents the accuracy results for the 14 OpenML datasets using MLP(5),
with additional detailed results for other network architectures available in our accompanying W&B projects and GitHub
repository.

C. Technical proofs
C.1. Auxiliary definitions
To proceed, let us first introduce or recall the definitions and notations:

                                                                   14
                                                                                                                                                  E NS L OSS: Stochastic Calibrated Loss Ensembles

                1.00
                                                                                                                                                                                                                                                                                                                                                                                     ensLoss                         Hinge                         BCE                         EXP

                0.95


                0.90


                0.85
Test Accuracy




                0.80


                0.75


                0.70


                0.65
                       CIFAR17
                                 CIFAR14
                                           CIFAR69
                                                     CIFAR16
                                                               CIFAR68
                                                                         CIFAR15
                                                                                   CIFAR78
                                                                                             CIFAR49
                                                                                                       CIFAR12
                                                                                                                 CIFAR58
                                                                                                                           CIFAR48
                                                                                                                                     CIFAR59
                                                                                                                                               CIFAR29
                                                                                                                                                         CIFAR06
                                                                                                                                                                   CIFAR13
                                                                                                                                                                             CIFAR79
                                                                                                                                                                                       CIFAR67
                                                                                                                                                                                                 CIFAR38
                                                                                                                                                                                                           CIFAR01
                                                                                                                                                                                                                     CIFAR07
                                                                                                                                                                                                                               CIFAR05
                                                                                                                                                                                                                                         CIFAR28
                                                                                                                                                                                                                                                   CIFAR18
                                                                                                                                                                                                                                                             CIFAR39
                                                                                                                                                                                                                                                                       CIFAR04
                                                                                                                                                                                                                                                                                 CIFAR89
                                                                                                                                                                                                                                                                                           CIFAR03
                                                                                                                                                                                                                                                                                                     CIFAR09
                                                                                                                                                                                                                                                                                                               CIFAR56
                                                                                                                                                                                                                                                                                                                         CIFAR46
                                                                                                                                                                                                                                                                                                                                   CIFAR08
                                                                                                                                                                                                                                                                                                                                             CIFAR19
                                                                                                                                                                                                                                                                                                                                                       CIFAR27
                                                                                                                                                                                                                                                                                                                                                                 CIFAR02
                                                                                                                                                                                                                                                                                                                                                                           CIFAR37
                                                                                                                                                                                                                                                                                                                                                                                     CIFAR26
                                                                                                                                                                                                                                                                                                                                                                                               CIFAR47
                                                                                                                                                                                                                                                                                                                                                                                                         CIFAR45
                                                                                                                                                                                                                                                                                                                                                                                                                   CIFAR36
                                                                                                                                                                                                                                                                                                                                                                                                                             CIFAR57
                                                                                                                                                                                                                                                                                                                                                                                                                                       CIFAR25
                                                                                                                                                                                                                                                                                                                                                                                                                                                 CIFAR24
                                                                                                                                                                                                                                                                                                                                                                                                                                                           CIFAR34
                                                                                                                                                                                                                                                                                                                                                                                                                                                                     CIFAR23
                                                                                                                                                                                                                                                                                                                                                                                                                                                                               CIFAR35
Figure 4. The overall pattern of performance (Accuracy) of E NS L OSS against all other fixed loss methods in 45 CIFAR2 binary
classification datasets (provided by pairwise labels subset of CIFAR10), based on VGG16, is illustrated. The x-axis represents label-paired
binary CIFAR datasets, where, for example, CIFAR35 corresponds to the CIFAR2 (cat-dog) dataset.


• Classification probability: η(X) := P(Y = 1|X).
• The Bayes classifier: f ∗ (x) = sgn(η(x) − 1/2).
• The pointwise minimization of R:
                                                                                                         C0 (η, α) = η1(α ≥ 0) + (1 − η)1(α ≤ 0),                                                                                                                                              H0 (η) = inf C0 (η, α).
                                                                                                                                                                                                                                                                                                                                      α∈R

• The pointwise minimization of Rϕ :
                                                                                                         Cϕ (η, α) = ηϕ(α) + (1 − η)ϕ(−α),                                                                                                                               Hϕ (η) = inf Cϕ (η, α),
                                                                                                                                                                                                                                                                                                                α∈R

                                                                                                                 Hϕ− (η) =                                                   inf                           Cϕ (η, α),                                        Hϕ+ (η) =                                               inf                               Cϕ (η, α).
                                                                                                                                                          α:α(2η−1)≤0                                                                                                                                 α:α(2η−1)>0


Proof of Theorem 3.6
Proof. We begin by defining the ensemble loss, denoted by ϕ(z), as the expected value of Φ(z) with respect to the distribution
of Φ, i.e., ϕ(z) := EΦ Φ(z). Note that the expectation is well-defined according to Assumption 3.4. Consequently, the
calibrated ensemble risk function can be reformulated as follows:
                                                                          
                                               R(f ) = EX,Y ϕ(Y f (X)) .
Thus, we can rewrite the ensemble risk in the classical form of a fixed loss, namely, R(f ) = Rϕ (f ), thereby enabling us to
leverage Theorems 1 and 2 in (Bartlett et al., 2006) to facilitate statistical analysis of the proposed method. Therefore, it
suffices to verify the BCC condition of the ensemble loss ϕ̄, that is, convexity, the bounded below condition, and having a
negative derivative at 0.
To clarify, we sometimes denote Φ(z) as Φ(z, ω) to emphasize that Φ : Ω → L is a L-valued random variable, equipped
with a probability measure µ. Now, we start with considering a simple finite space case, which provides insight into the
underlying proof strategy.

Specific case: a finite space. Suppose L = {ϕ1 , · · · , ϕQ } is a finite space, ϕ(z) can be simplified as ϕ(z) =
PQ                                                     PQ
    q=1 πq ϕq (z), where πq = P(Φ = ϕq ) > 0 and          q=1 πq = 1. Next, we check the BCC conditions of ϕ. (i)
ϕ is a convex combination of convex functions, thus ϕ is convex; (ii) since ϕq is bounded below by cq , thus ϕ
is bounded below by minq=1,··· ,Q cq ; (iii) ϕq is differentiable at 0 for all q, thus ϕ is also differentiable at 0, and
                     PQ
ϕ′ (0) := EΦ′ (0) = q=1 πq ϕ′q (0) < 0. Therefore, ϕ satisfies the BCC conditions.

                                                                                                                                                                                                                                          15
                                        E NS L OSS: Stochastic Calibrated Loss Ensembles


Table 9. The averaged classification Accuracy and AUC and their standard errors (in parentheses) of all methods in the image dataset
CIFAR2 (cat-dog) are presented. Bold font is used to denote statistical significant improvements over ALL other competitors.
                              M ODELS           BCE            E XP           H INGE          E NS L OSS
                              (Acc)
                              ResNet34          68.94(0.45)    60.10(0.44)    70.39(0.37)    72.03(0.71)
                              ResNet50          67.59(0.35)    61.57(0.56)    67.57(0.28)    72.04(0.35)
                              ResNet101         67.32(0.23)    53.57(0.41)    67.12(0.32)    70.07(0.90)
                              VGG16             77.36(0.68)    69.27(0.44)    78.13(0.87)    81.13(0.77)
                              VGG19             76.96(1.03)    66.38(1.17)    78.06(0.68)    80.57(0.76)
                              MobileNet         66.77(0.86)    55.89(1.69)    67.66(1.03)    69.98(1.08)
                              MobileNetV2       73.34(1.12)    62.94(1.09)    73.45(1.02)    78.40(1.56)
                              (AUC)
                              ResNet34          75.97(0.44)    64.39(0.52)    76.02(0.32)    79.24(1.09)
                              ResNet50          73.96(0.29)    65.52(0.60)    74.37(0.23)    79.40(0.31)
                              ResNet101         73.35(0.24)    54.88(0.34)    68.61(0.66)    76.60(0.87)
                              VGG16             85.42(0.71)    76.13(0.94)    86.20(0.63)    89.54(0.29)
                              VGG19             85.61(0.97)    72.88(1.12)    84.47(1.07)    87.55(1.08)
                              MobileNet         73.12(0.97)    58.51(1.77)    73.96(1.34)    76.61(1.23)
                              MobileNetV2       81.29(0.96)    67.53(1.11)    81.31(0.74)    86.22(1.37)


Table 10. The averaged classification Accuracy and AUC and their standard errors (in parentheses) of all methods in the image dataset
PCam are presented. Bold font is used to denote statistical significant improvements over ALL other competitors.
                                M ODELS      BCE              E XP           H INGE         E NS L OSS
                                (Acc)
                                ResNet34     76.91(0.52)      73.78(0.52)    77.20(0.18)    82.33(0.30)
                                ResNet50     77.23(0.51)      74.10(0.49)    77.96(0.34)    82.00(0.07)
                                VGG16        80.97(0.25)      77.11(0.50)    82.69(0.30)    85.77(0.35)
                                VGG19        81.58(0.25)      76.13(0.35)    82.77(0.41)    85.91(0.19)
                                (AUC)
                                ResNet34     88.69(0.34)      83.30(0.57)    76.11(0.37)    92.24(0.13)
                                ResNet50     88.75(0.30)      83.51(0.46)    77.24(0.67)    92.07(0.49)
                                VGG16        93.35(0.26)      88.77(0.59)    86.18(0.56)    95.44(0.24)
                                VGG19        93.49(0.17)      87.89(0.46)    84.09(0.60)    95.51(0.14)


General cases. Now, suppose L is a general measurable BCC subspace satisfying Assumption 3.4. The crucial issue is
whether the BCC conditions are complete in the space L over limiting. Let us check the BCC conditions of ϕ. (i) Convexity.
Note that
                                 Z                                     Z
                                                          
          ϕ λz1 + (1 − λ)z2 =       Φ λz1 + (1 − λ)z2 , ω dµ(ω) ≤          λΦ(z1 , ω) + (1 − λ)Φ(z2 , ω)dµ(ω)
                                       Ω                                          Ω
                                   = λϕ(z1 ) + (1 − λ)ϕ(z2 ),

where the inequality follows from the fact that L is a BCC subspace and thus Φ(z, ω) is convex for any ω ∈ Ω. Thus, ϕ is a
convex function. (ii) Bounded below.
                                        Z                    Z
                                ϕ(z) =      Φ(z, ω)dµ(ω) ≥      U (ω)dµ(ω) = EU > −∞,
                                            Ω                         Ω

where the inequality follow from the second condition in Assumption 3.4 such that Φ(z, ω) ≥ U (ω) for any z almost surely.
(iii) Calibration. For every sequence δn with δn → 0, without loss of generality, we assume |δn | ≤ δ0 , which can be satisfied
for sufficiently large n. We now check the definition of differentiability of ϕ at z = 0:
                           ϕ(δn ) − ϕ(0)            Φ(δn , ω) − Φ(0, ω)
                                                 Z                                        Z
                     lim                 = lim                            dµ(ω) = lim       Gn (ω)dµ(ω),
                    n→∞          δn        n→∞ Ω             δn                     n→∞ Ω



                                                                     16
                                          E NS L OSS: Stochastic Calibrated Loss Ensembles


Table 11. The averaged classification Accuracy and its standard errors (in parentheses) of all methods with MLP(5) in 14 OpenML datasets
are presented. Bold font is used to denote statistical significant improvements over ALL other competitors.
                      MLP(5)          (n, d)×103       BCE             E XP              H INGE    E NS L OSS (our)
                      Bioresponse     (3.75, 1.78)     76.84(1.33)     77.49(1.44)   76.03(0.67)   77.18(1.18)
                      guillermo       (20.0, 4.30)     70.35(0.44)     70.26(0.67)   69.67(0.63)   75.34(0.78)
                      riccardo        (20.0, 4.30)     98.68(0.21)     98.69(0.13)   98.62(0.23)   99.14(0.23)
                      hiva-agnostic   (4.23, 1.62)     91.02(0.85)     91.65(1.30)   95.55(0.53)   90.61(1.49)
                      christine       (5.42, 1.64)     69.62(1.07)     69.42(1.30)   67.48(0.72)   69.94(0.93)
                      OVA-Breast      (1.54, 10.9)     94.27(1.33)     94.38(1.41)   92.61(1.75)   95.45(1.30)
                      OVA-Uterus      (1.54, 10.9)     80.54(1.54)     82.09(1.50)   84.22(1.75)   86.68(1.66)
                      OVA-Ovary       (1.54, 10.9)     81.83(1.69)     82.82(2.19)   82.76(1.69)   87.16(1.40)
                      OVA-Kidney      (1.54, 10.9)     97.59(0.83)     97.72(0.65)   96.47(0.95)   98.06(0.48)
                      OVA-Lung        (1.54, 10.9)     88.17(1.70)     89.31(2.36)   89.76(1.53)   93.00(1.31)
                      OVA-Om          (1.54, 10.9)     71.42(3.53)     74.91(1.84)   79.25(2.19)   82.00(1.98)
                      OVA-Colon       (1.54, 10.9)     95.73(0.87)     95.73(0.88)   95.15(0.79)   96.27(0.63)
                      OVA-En          (1.54, 10.9)     71.66(3.79)     74.33(1.73)   81.68(1.87)   83.19(2.01)
                      OVA-Prostate    (1.54, 10.9)     97.39(0.51)     96.96(0.77)   97.22(0.84)   97.93(0.60)


                                        
where Gn (ω) := Φ(δn , ω) − Φ(0, ω) /δn . Next, the proof involves usage of the Dominated Convergence Theorem (c.f.
Theorem 1.19 in (Evans, 2018)) to exchange the limit and the integration. To proceed, since Φ(z, ω) is differentiable at 0 for
any ω ∈ Ω, it follows that limn→∞ Gn (ω) = Φ′ (0, ω) pointwise. Note that Φ(z, ω) is convex w.r.t. z for any ω ∈ Ω, then
by the definition of the subderivative, we have,

                         Φ(δn , ω) − Φ(0, ω) ≥ Φ′ (0, ω)δn , and Φ(0, ω) − Φ(δn , ω) ≥ −∂Φ(δn , ω)δn ,

which yields that

                             |Gn (ω)| ≤ max |∂Φ(δn , ω)|, |Φ′ (0, ω)| ≤ sup |∂Φ(δ, ω)| ≤ G(ω),
                                                                     
                                                                                |δ|≤δ0
                              Z
                                   G(ω)dµ(ω) = EG < ∞.
                               Ω

Thus, Gn is dominated by G, then the Dominated Convergence Theorem yields that the limit exists and equals to,

                   ϕ(δn ) − ϕ(0)
                                          Z                            Z
                                                                            Φ′ (0, ω)dµ(ω) = E Φ′ (0) := ϕ′ (0) < 0,
                                                                                                     
                lim              =             lim Gn (ω)dµ(ω) =
               n→∞       δn                Ω n→∞                        Ω

where the last inequality follows from that Φ′ (0, ω) < 0 for all ω ∈ Ω.

In summary, we have proved that ϕ̄ : R → R satisfies the BCC conditions. Consequently, according to Theorem 1 and
Theorem 2 (part 2) in (Bartlett et al., 2006), we can draw the following conclusions:

  1. ϕ is classification-calibrated, as stated in Definition 1.1.

  2. The excess risk bound of R(·) is provided as:

                                                     R(f ) − R∗ ≤ ψ −1 R(f ) − R∗ ,
                                                                                 


     where ψ is defined as:
                                                               1 + θ             1 + θ
                                         ψ(θ) = ϕ(0) − Hϕ             = E Φ(0) − H        ,
                                                                 2                   2
     where H(η) := inf α∈R EΦ CΦ (η, α).

This completes the proof.

                                                                  17
                                        E NS L OSS: Stochastic Calibrated Loss Ensembles

Proof of Lemma 3.2
Proof. Since ϕ is convex and calibrated, ϕ′ (0) < 0, and ϕ(z) ≥ ϕ(0) + ϕ′ (0)z ≥ ϕ(0) when z ≤ 0, thus ϕ(z) is bounded
below when z ≤ 0. Next, we aim to establish a lower bound of ϕ(z) for z > 0.

CASE 1. If there exists a constant z0 > 0 such that ∂ϕ(z0 ) ≥ 0, then ϕ(z) ≥ ϕ(z0 ) + ∂ϕ(z0 )(z − z0 ) ≥ ϕ(z0 ) for z ≥ z0 .
For 0 ≤ z ≤ z0 , ϕ(z) is bounded according to the boundedness theorem. Then, ϕ(z) is bounded below.

CASE 2. If ∂ϕ(z) < 0 for all z > 0. Then, for any z > 0, we partition [0, z] as n intervals with d0 = 0, d1 =
z/n, · · · , dn−1 = (n − 1)z/n, dn = z, for the i-th interval, we have
                                                 ϕ(di+1 ) ≥ ϕ(di ) + ∂ϕ(di )z/n.
Taking the summation for both sides, and ∂ϕ(z) is nondecreasing according to Lemma C.2,
                                                       n−1                      n−1
                                                     ∂ϕ(di )z
                                                       X               ϕ′ (0)z X ∂ϕ(di )z
                         ϕ(z) = ϕ(dn ) ≥ ϕ(d0 ) +             = ϕ(0) +        +
                                                 i=0
                                                        n                 n      i=1
                                                                                        n
                                         ′       Z z                    ′       Z ∞
                                        ϕ (0)z                         ϕ (0)z
                               ≥ ϕ(0) +        +     ∂ϕ(z)dz ≥ ϕ(0) +         +      ∂ϕ(z)dz,
                                           n      0                       n       0

where the second last inequality follows from the integral test, and the last inequality again follows from Lemma C.2. Taking
the limit for n → ∞, for any z > 0, we have
                                            Z ∞                        Z z0               Z ∞
                                                                                                ∂ϕ(z)
              ϕ(z) = lim ϕ(z) ≥ ϕ(0) +           ∂ϕ(z)dz = ϕ(0) +            ∂ϕ(z)dz +                g(z)dz
                      n→∞                    0                           0                  z0   g(z)
                                                 Z ∞
                                                                                        ϕ′ (0) ∞
                                                                                               Z
                                         ∂ϕ(z0 )
                   ≥ ϕ(0) + ϕ′ (0)z0 +                 g(z)dz ≥ ϕ(0) + ϕ′ (0)z0 +                   g(z)dz > −∞.
                                          g(z0 ) z0                                    g(z0 ) z0
The desirable result then follows.

Proof of Lemma 3.3
Proof. Before proceed, we add z = 0 into the batch points as {z1 , · · · , zB+1 }. Without loss generality, we assume (i)
zi ̸= zj , as we can duplicate the gradient by merging and treating them as one point; and assume that (ii) z1 < z2 · · · < zB+1
and zb0 = 0, as we can always sort the batch points. Next, we also design and add the loss-derivative for zb0 = 0 into the
given loss-derivatives g to form a new gradient vector g̃, specifically,
                                       g̃i := gi ,   if i < z0 ,        g̃i := gi−1   if i > z0 ,
where g̃b0 = min(g̃b0 −1 /2, (g̃b0 −1 + g̃b0 +1 )/2), if b0 > 1; g̃b0 = min(g̃b0 +1 , −1), if b0 = 1. Hence, g̃b0 < 0 and
g̃b0 −1 ≤ g̃b0 ≤ g̃b0 +1 .
Then, we define u1 = (z1 + z2 )/2, · · · , ui = (zi + zi+1 )/2, · · · , uB = (zB + zB+1 )/2, uB+1 = zB+1 + 1, and the
corresponding loss function ϕ can be formulated as follows.
                        
                        
                         l1 (z) = g̃1 z,                                          if z ≤ u1 ,
                          l2 (z) = g̃2 (z − u1 ) + l1 (u1 ),                       if u1 < z ≤ u2 ,
                        
                        
                        
                        
                        
                          · · · ,
                        
                        
                        
                        
                 ϕ(z) : lb0 (z) = g̃b0 (z − ub0 −1 ) + lb0 −1 (ub0 −1 ),           if ub0 −1 < z ≤ ub0 ,
                        
                          · · · ,
                        
                        
                        
                        
                        
                        lB+1 (z) = g̃B+1 (z − uB ) + lB (uB ),
                        
                                                                                  if uB < z ≤ uB+1 ,
                        
                          lB+2 (z) = max(g̃B+1 , 1)(z − uB+1 ) + lB+1 (uB+1 ), if z > uB+1 .
                        

By definition, ϕ provides the loss-derivatives for original sample points, that is, ϕ′ (zi ) = gi for all i ̸= b0 . Now,
we verify that ϕ(z) is a BCC loss. Specifically, (i) ϕ(z) is a continuous piecewise linear function with coefficients
g̃1 ≤ g̃2 ≤ · · · ≤ g̃B+1 ≤ max(g̃B+1 , 1) according to Condition 1 and the definition of g̃. ϕ(z) is a convex function. (ii)
Note that zb0 = 0 ∈ (ub0 −1 , ub0 ], hence ϕ(z) is differentiable at 0 and ϕ′ (0) = lb′ 0 (0) = g̃b0 < 0. ϕ is calibrated. (iii) ϕ(z)
is increasing function when z ≥ uB+1 , thus it is bounded below. This completes the proof.

                                                                   18
                                      E NS L OSS: Stochastic Calibrated Loss Ensembles

Proof of Lemma 3.5
                                                                                                   PQ
Proof. Suppose L = {ϕ1 , · · · , ϕQ } is a finite space, then EΦ(z) is defined as EΦ(z) := q=1 πq ϕq (z) < ∞, where
                              PQ
πq = P(Φ = ϕq ) > 0 and q=1 πq = 1, which leads to Condition 1. Since ϕq is bounded below, that is, there exists
a constant Uq > −∞, such that ϕq (z) ≥ Uq , thus EΦ(z) ≥ minq=1,··· ,Q (Uq ) =: U > −∞, which leads to Condition
2. Finally, ϕq is convex and differentiable at 0, then ∂ϕq (z) converges to ϕ′q (0) when z → 0, see Corollary 4.2.3 in
(Hiriart-Urruty & Lemaréchal, 1996). Therefore, for each q = 1, · · · , Q, there exists constants δq > 0 and Gq > 0, such that
|∂ϕq (z)| ≤ Gq for all z ∈ [−δq , δq ], which leads to Condition 3 by the fact that |∂ϕq (z)| ≤ maxq=1,··· ,Q Gq =: G < ∞
for z ∈ [−δ0 , δ0 ] with δ0 = minq=1,··· ,Q δq for all q = 1, · · · , Q. This completes the proof.

Auxiliary lemmas
Lemma C.1. For Cϕ (η, α), Hϕ (η), Hϕ− (η) and Hϕ+ (η) defined in Appendix C.1 with a convex and bounded below ϕ, then

  a. Cϕ (η, α) is convex with respect to α.
  b. For any η ̸= 1/2, Hϕ− (η) > Hϕ (η) is equivalent to Hϕ− (η) > Hϕ+ (η).

  c. If ∂ϕ(0) < 0, then Hϕ− (η) = ϕ(0).


Proof. (a). Since 0 ≤ η ≤ 1, Cϕ (η, α) = ηϕ(α) + (1 − η)ϕ(−α) is a convex combination of ϕ(α) and ϕ(−α). Then,
Cϕ (η, α) is convex with respect to α since both ϕ(α) and ϕ(−α) are both convex.

(b). Denote A = {α|α(2η − 1) ≤ 0}, then Hϕ (η) = inf α∈A∪Ac Cϕ (η, α), Hϕ− (η) = inf α∈A Cϕ (η, α), and Hϕ+ (η) =
inf α∈Ac Cϕ (η, α). Given that η ̸= 1/2, both A and Ac are nonempty.
We first show that Hϕ (η) = min Hϕ− (η), Hϕ+ (η) . Note that Hϕ (η) ≤ Hϕ− (η) and Hϕ (η) ≤ Hϕ+ (η), then
                                                      

Hϕ (η) ≤ min Hϕ− (η), Hϕ+ (η) . On the other hand, for any α ∈ R, then either α ∈ A or α ∈ Ac , thus
                                   

Cϕ (η, α) ≥ min Hϕ− (η), Hϕ+ (η) , and Hϕ (η) ≥ min Hϕ− (η), Hϕ+ (η) .
                                                                    

Now, Hϕ− (η) > Hϕ (η) = min Hϕ− (η), Hϕ+ (η) if and only if Hϕ+ (η) < Hϕ− (η).
                                                

                                                                      
(c). Since ϕ is convex, Cϕ (η, α) = ηϕ(α) + (1 − η)ϕ(−α) ≥ ϕ (2η − 1)α . Hence,

                          ϕ(0) = Cϕ (η, 0) ≥ Hϕ− (η) =
                                                                                         
                                                             inf      Cϕ (η, α) ≥ inf ϕ z = ϕ(0),
                                                          α(2η−1)≤0               z≤0

where the last equality follows from the fact that ϕ is convex and ϕ(z) ≥ ϕ(0) + ∂ϕ(0)z ≥ ϕ(0) when z ≤ 0. The desirable
result then follows.
Lemma C.2. Let ϕ : R → R be a convex function. Then

  a. The sub-derivative ∂ϕ is nondecreasing.
  b. If ϕ(x) > ϕ(y) for some (x, y), then for any z between x and y (excluding x and y), ϕ(x) > ϕ(z).


Proof. (a). By the definition of sub-derivative, for any y > x, we have

                              ϕ(y) ≥ ϕ(x) + ϕ′ (x)(y − x),         ϕ(x) ≥ ϕ(y) + ϕ′ (y)(x − y),

providing that (y − x)(ϕ′ (x) − ϕ′ (y)) ≤ 0. Thus, ϕ′ is a nondecreasing function.

(b). For any z between x and y, there exists λ > 0, such that z = λx + (1 − λ)y, then

                                ϕ(z) = ϕ(λx + (1 − λ)y) ≤ λϕ(x) + (1 − λ)ϕ(y) < ϕ(x).



                                                              19
                                       E NS L OSS: Stochastic Calibrated Loss Ensembles

An example illustrating Theorem 3.6
Let L = {ϕ1 , ϕ2 }, where ϕ1 (z) = exp(−z) is the exponential loss, and ϕ2 (z) = log(1 + e−2z ) is the logistic loss, and
P(Φ = ϕq ) = πq > 0, then R(·) is classification-calibrated, and the excess risk bound is provided as:

                                             ψ R(f ) − R∗ ≤ R(f ) − R∗ ,
                                                            

                   √                                                     
where ψ(θ) = π1 1 − 1 − θ2 + π2 /2 (1 − θ) log(1 − θ) + (1 + θ) log(1 + θ) for θ ∈ [0, 1], which can be simplified as:

                                                               2
                                                                       q
                                          R(f ) − R∗ ≤ √                   R(f ) − R∗ .
                                                            2π1 + π2

D. Calibration for unbounded below losses
In this section, we discuss the relationship between the unbounded below condition and calibration for surrogate loss
functions. First, we present that the bounded below condition is indeed a necessary condition for classification-calibration.
Corollary D.1. Suppose a convex loss function ϕ(·) is unbounded below, then it is not classification-calibrated.

Proof. Since ϕ(z) is convex and unbounded below, then ϕ(z) → −∞ for z → ∞. Let’s consider the case where there
exists a domain X0 such that 1 > P(X ∈ X0 ) > 0 and η(x) = 1 for x ∈ X0 . Then, define fl (x) = l when x ∈ X0 , and
                  / X0 . In this case,
fl (x) = 0 when x ∈

                                                               / X0 )ϕ(0) → −∞ = Rϕ∗ ,
                                                                        
                          Rϕ (fl ) = E 1(X ∈ X0 )ϕ(l) + E 1(X ∈

however, it is clear that R(fl ) ↛ R∗ , since fl fails to match the Bayes rule when x ∈
                                                                                      / X0 . Thus, if ϕ is calibrated, it must be
bounded below.

The concept of classification-calibration is considered “universal”, as it requires the loss function to ensure consistency for
all data distributions. We then investigate a weak version of calibration: can unbounded below loss functions guarantee
calibration for some specific data distributions?
To address this question, we start by extending the if and only if condition for the equivalent definitions of classification-
calibration in (Bartlett et al., 2006).
Lemma D.2. For any loss function ϕ : R → (−∞, ∞), Rϕ∗ > −∞ if and only if the statements (a) and (b) are equivalent,
where statements (a) and (b) are defined as:

  a. For any η ̸= 1/2, Hϕ− (η) > Hϕ (η).

  b. For every sequence of measurable function fl : X → R and every probability distribution on X × {±1},

                                           Rϕ (fl ) → Rϕ∗    implies that    R(fl ) → R∗ .


Proof. The necessity (=⇒). Suppose Rϕ∗ > −∞, then (a) =⇒ (b) can be proved by following the proof of Theorem 1
(the last paragraph) in (Bartlett et al., 2006). Next, we tend to prove (b) =⇒ (a) by contradiction. Suppose there exist a
sequence of {fl } and some probability distribution, such that

                                              Rϕ (fl ) → Rϕ∗ , but R(fl ) ↛ R∗ .                                            (11)

Define
                                         n                                o
                                    Ωϕ := X : lim Cϕ η(X), fl (X) = Hϕ η(X) ,
                                              l→∞
                                         n                                o
                                     Ω := X : lim C0 η(X), fl (X) = H0 η(X) .
                                                  l→∞


                                                               20
                                       E NS L OSS: Stochastic Calibrated Loss Ensembles

Since ϕ(0) ≥ Rϕ∗ > −∞, and 1 ≥ R∗ ≥ 0, (11) implies that P(Ωϕ ) = 1 and P(Ω) < 1, and thus P(Ωc \ Ωcϕ ) ≥
P(Ωc ) − P(Ωcϕ ) > 0. Therefore, there exists a subset A ⊆ Ωc \ Ωcϕ with P(A) > 0, such that for any x ∈ A, we have

                                       Cϕ (η, αl ) → Hϕ (η), but C0 (η, αl ) ↛ H0 (η),

where η := η(x) and αl := fl (x). This implies that ∃ϵ > 0, ∀L0 , ∃l > L0 , such that, C0 (η, αl ) > H0 (η), and thus
αl (2η − 1) ≤ 0. Now, Hϕ− (η) = Hϕ (η) follows from by taking limits of Hϕ (η) ≤ Hϕ− (η) ≤ Cϕ (η, αl ), and the fact that
Cϕ (η, αl ) → Hϕ (η), which contradicts to the calibration definition of ϕ in (a). This completes the proof of the necessity.
The sufficiency (⇐=). We construct the proof by contradiction. Suppose Rϕ∗ = −∞, we can find an example that (a) does
not imply (b). Specifically, assume that ϕ is classification calibrated and Rϕ (fl ) → Rϕ∗ = −∞, then there exists a sequence
{fl } such that P(Ωϕ ) = 1, and a set A with P(A) = c > 0, such that Hϕ (η(x)) = −∞, for x ∈ A. Now, we split A as
two disjoint sets A1 and A2 each with probability measure c/2, and define a new sequence f˜l (x) := fl (x) for x ∈ Ac1 , and
f˜l (x) := 0 for x ∈ A1 . In this case,
                                                                                             
               Rϕ (f˜l ) = P(X ∈ A1 )ϕ(0) + E 1(X ∈ A2 ) + 1(X ∈        / A) Cϕ η(X), fl (X) → −∞ = Rϕ∗ .
                                                                             


However, R(f˜l ) ↛ R∗ since x ∈ A1 , C0 (η(x), f˜l (x)) = 1 > min(η(x), 1 − η(x)) = H0 (η(x)) and P(A1 ) = c/2 > 0.
This completes the proof.

Lemma D.2 relaxes the non-negativeness or bounded below condition for calibration in (Bartlett et al., 2006), which helps
extend the if and only if conditions of classification-calibration to more general loss functions. For example, if we work
with specific data distributions, many calibrated surrogate losses do not need to be unbounded below, as illustrated in the
following examples.

Hinge loss with varying right tails. In this example, we examine the impact of various right tails on calibration of loss
functions. Specifically, we adopt the shape of hinge loss function ϕ(z) = 1 − z, when z < 1, and explore different right
tails when z ≥ 1, then discuss calibration.

   • When z ≤ 1, ϕ(z) = 1 − z;
   • When z > 1, (zero tail) ϕ(z) = 0; (exponential tail) ϕ(z) = e−(z−1) − 1; (inverse tail) ϕ(z) = 1/z − 1; (inv-log tail)
     ϕ(z) = e/ log(z + e − 1) − e; (logarithm tail) ϕ(z) = − log(z).
Lemma D.3. Suppose η(X) ∈ [ϵ, 1 − ϵ] almost surely for any fixed ϵ > 0, then the hinge loss, with the zero, exponential,
inverse, inverse-logarithm, and logarithm tails, are all classification-calibrated.

Proof. We can check that Rϕ∗ > −∞ for all pre-defined losses, and ϕ is convex with ϕ′ (0) < 0 then ϕ is classification-
calibrated.

Therefore, some unbounded below loss functions can still provide calibration for particular data distributions. Unfortunately,
unbounded below loss functions often exhibit instability during training with SGD, even if they are calibrated in simulated
cases (see our G ITHUB). One possible explanation is that the batch sampling may disrupt the distribution assumptions
necessary for calibration of unbounded below losses. Conversely, bounded below calibrated loss functions do not rely on
data distribution assumptions to maintain calibration.
This appendix delineates the relationship between the bounded below condition and calibration. First, the bounded below
condition is a necessary condition for calibration. Next, by introducing additional distribution assumptions, it is demonstrated
that certain unbounded below loss functions can still be calibrated. Lastly, through numerical experiments, it is suggested
that unbounded below loss functions may exhibit potential instability during SGD training. In conclusion, the unbounded
below condition (or superlinear raising tail) is identified as a critical yet often underestimated criterion for loss functions,
both theoretically and in numerical implementations.




                                                              21
