arXiv:2609.02304cs.LGSep 2026

Manuscript Offprint

arXiv:2609.02304

Bayes-Optimal BER and AUC: Estimation and Evaluation of Estimators

Ryota Ushio, Takashi Ishida, Masashi Sugiyama

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

A fundamental quantity in machine learning is the optimal performance achievable by any model on a given task. Estimating this quantity allows us to distinguish the irreducible part of the error from a deficiency of the model, telling us how much room for improvement remains. Recent work has shown that the Bayes error, or equivalently the optimal accuracy, can be estimated from soft labels in binary classification. However, accuracy is often a poor summary of performance in settings with severe class imbalance or noisy annotations, where metrics such as the balanced error rate (BER) and the area under the ROC curve (AUC) are more appropriate. We address this gap with two complementary contributions. (i) Estimation. We propose soft-label-based estimators for the optimal BER and AUC. We first consider the clean setting in which true soft labels and the class prior are known, and then extend the estimators to a more realistic setting in which the class prior is unknown and the observed soft labels are corrupted by an unknown order-preserving transformation, possibly followed by additive noise. In the latter setting, we approximately recover the clean soft labels via isotonic regression with auxiliary hard labels, estimate the class prior with a clipped mean of the hard labels, and derive finite-sample error bounds for the resulting plug-in estimators. (ii) Evaluation. Since the optimum is unobservable on real datasets, evaluating any such estimator is itself nontrivial. We extend the FeeBee framework, originally proposed for evaluating Bayes-error estimators, to the optimal BER and AUC. The resulting procedure provides practical evaluation scores without requiring knowledge of the optimum, and applies to any estimator of the optimal BER or AUC, not only our proposed ones. Experiments on synthetic and real-world datasets validate both the estimators and the evaluation procedure.

1 Introduction

An integral part of machine learning workflows is evaluating models using performance metrics. Of natural interest, then, is the Bayes-optimal performance, i.e., the best value achievable by any model on a given task. This quantity represents the irreducible component of the error and helps us separate a deficiency of the current model from the inherent difficulty of the task. In practice, when the gap between current and optimal performance is small, it tells us that not much room is left for improvement and that further training of the current model or training of larger models is unlikely to help. This is particularly important in the era of large-scale machine learning models, which often require a huge amount of computational resources to train and have a significant environmental impact (Strubell et al., 2020; Luccioni et al., 2023). Moreover, recent work suggests that estimation of the Bayes-optimal performance can be useful for detecting data contamination (Ishida et al., 2026).

We focus on binary classification in this paper. Given a binary classifier h:X→{0,1}h: \mathcal{X} \to \{0,1\}, the most commonly used metric to measure its performance is the error rate Err(h):=P(h(x)≠y)\text{Err}(h):=\mathbb{P}(h(x) \neq y)

Preprint.

or the accuracy 1−Err(h)1 - \text{Err}(h), where (x,y)(x, y) is drawn from an unknown joint distribution P\mathbb{P} over the space X\mathcal{X} of input features and the set {0,1}\{0,1\} of class labels. When the class posterior, described by η(x):=P(y=1∣x)\eta(x) := \mathbb{P}(y = 1 \mid x), is genuinely uncertain, even a perfect predictor cannot avoid misclassification due to the stochasticity of the labels. The lowest achievable error rate Err∗:=inf⁡h:X→{0,1}Err(h)\text{Err}^* := \inf_{h:\mathcal{X} \to \{0,1\}} \text{Err}(h), also known as the Bayes error, therefore quantifies the inherent label uncertainty and is determined by the underlying data distribution.

Estimation of the Bayes error has a long history in the literature. While most existing methods use input-label pairs {(xi,yi)}i=1n\{(x_i, y_i)\}_{i=1}^n (Fukunaga & Hostetler, 1975; Devijver, 1985; Berisha et al., 2014; Moon et al., 2018; Noshad et al., 2019; Theisen et al., 2021), a recent line of work suggests another approach that estimates the Bayes error from soft labels ηi=η(xi)\eta_i = \eta(x_i), i=1,…,ni = 1, \ldots, n (Ishida et al., 2023; Jeong et al., 2023; Ushio et al., 2026). A soft label ηi\eta_i represents class membership as a probability value in [0,1][0,1] unlike a binary hard label yi∈{0,1}y_i \in \{0,1\}. This soft-label-based approach does not need access to the input features xix_i, which makes it suitable for privacy-sensitive applications and also allows it to bypass the curse of dimensionality. Also, it does not make the distributional assumptions often imposed by the methods based on input-label pairs, such as lower/upper bounds on the probability density function or Lipschitzness of the density. Early work typically assumes that the true soft labels ηi\eta_i or their high-quality estimates are available, e.g., by averaging many independent annotations per instance (Ishida et al., 2023; Jeong et al., 2024), which might be unrealistic in practice. More recent work (Ushio et al., 2026) relaxed this assumption by allowing the soft labels to be corrupted by unknown order-preserving transformations.

However, the error rate is a poor summary of performance under class imbalance or label noise, which are both common in practice, and other metrics such as the balanced error rate (BER) and the area under the ROC curve (AUC) are often preferred in such settings (Ling & Li, 1998; Gu et al., 2009; Menon et al., 2013, 2015; van Rooyen et al., 2015; Menon et al., 2018; Charoenphakdee et al., 2019). Concretely, the BER of a classifier h:X→{0,1}h: \mathcal{X} \to \{0,1\} is the average of the in-class error rates, i.e., BER(h):=(FPR(h)+FNR(h))/2\text{BER}(h) := (\text{FPR}(h) + \text{FNR}(h))/2, where FPR(h):=P(h(x)=1∣y=0)\text{FPR}(h) := \mathbb{P}(h(x) = 1 \mid y = 0) and FNR(h):=P(h(x)=0∣y=1)\text{FNR}(h) := \mathbb{P}(h(x) = 0 \mid y = 1) are the false positive and false negative rates (Menon et al., 2015). The AUC of a score-based classifier f:X→Rf: \mathcal{X} \to \mathbb{R} that predicts h(x)=1[f(x)≥0]h(x) = \mathbb{1}[f(x) \geq 0] is the frequency that a random positive instance x+∼P(x∣y=1)x_+ \sim \mathbb{P}(x \mid y = 1) is ranked above a random negative instance x−∼P(x∣y=0)x_- \sim \mathbb{P}(x \mid y = 0), with ties counted at 1/21/2: AUC(f):=E[1[f(x+)>f(x−)]+121[f(x+)=f(x−)]]\text{AUC}(f) := \mathbb{E}\left[\mathbb{1}[f(x_+) > f(x_-)] + \frac{1}{2}\mathbb{1}[f(x_+) = f(x_-)]\right], where 1[⋅]\mathbb{1}[\cdot] denotes the indicator function (Clémençon et al., 2008; Menon et al., 2015). Under severe class imbalance, a trivial classifier that always predicts the majority class can achieve a near-zero error rate while learning nothing from data, and hence the error rate is not helpful. BER remains informative even under class imbalance by averaging the per-class error rates (Menon et al., 2013). AUC is also a preferred metric under class imbalance, as it summarizes the trade-off between true- and false-positive rates over all decision thresholds (Ling & Li, 1998; Fawcett, 2006; Gu et al., 2009). Moreover, BER and AUC are popular metrics under label noise due to their robustness; e.g., their optimizers remain unchanged under noisy labels (Menon et al., 2015; van Rooyen et al., 2015).

Our contribution Despite the practical importance of BER and AUC, the estimation of their Bayes-optimal values, i.e., BER∗:=inf⁡h:X→{0,1}BER(h)\text{BER}^* := \inf_{h:\mathcal{X} \to \{0,1\}} \text{BER}(h) and AUC∗:=sup⁡f:X→RAUC(f)\text{AUC}^* := \sup_{f:\mathcal{X} \to \mathbb{R}} \text{AUC}(f), remains underexplored. The first part of our contribution fills this gap by proposing soft-label-based estimators of BER∗\text{BER}^* and AUC∗\text{AUC}^*. We start with the clean setting similar to the work by Ishida et al. (2023) for the Bayes error, in which the true soft labels ηi\eta_i are available (Section 2). Then, inspired by Ushio et al. (2026), we extend the estimators to a more realistic setting where the soft labels are only observed through some unknown order-preserving corruption, possibly followed by additive noise (Section 3). Unlike the Bayes error, the optimal BER and AUC depend on the class prior θ:=P(y=1)(0<θ<1)\theta := \mathbb{P}(y = 1) (0 < \theta < 1). We first assume that θ\theta is known for simplicity and then handle the unknown-prior case.

A separate question is how to evaluate an estimator of BER* or AUC* on real datasets. This is challenging because, for real-world datasets, the underlying data distribution is unknown and does not reveal the ground-truth optimal values. For the Bayes error, Renggli et al. (2021) proposed FeeBee, which sidesteps this issue with a simple idea of injecting label noise. In the second part of our contribution, we extend this idea to the optimal BER and AUC (Section 4). Specifically, we first derive a simple closed-form relationship between the original optima and their noise-injected counterparts. Then, we propose scores for evaluating estimators of BER* and AUC* based on the derived relationship. The procedure can be applied to any estimator of BER* or AUC*, not only the ones we propose. Our proposed method allows us to evaluate Bayes-optimal BER/AUC estimators on real-world datasets without knowledge of the true optima.

References (44)