Conservative Prediction via Data-Driven Confidence Minimization
Authors: Caroline Choi
Fahim Tajwar
Yoonho Lee
Huaxiu Yao
Ananya Kumar
Chelsea Finn
Venue: Accepted by TMLR ()

Abstract: In safety-critical applications of machine learning, it is often desirable for a model to be \textit{conservative}, abstaining from making predictions on ``unknown'' inputs which are not well-represented in the training data. However, detecting unknown examples is challenging, as it is impossible to anticipate all potential inputs at test time. To address this, prior work minimizes model confidence on an auxiliary outlier dataset carefully curated to be disjoint from the training distribution. We theoretically analyze the choice of auxiliary dataset for confidence minimization, revealing two actionable insights: (1) if the auxiliary set contains unknown examples similar to those seen at test time, confidence minimization leads to provable detection of unknown test examples, and (2) if the first condition is satisfied, it is unnecessary to filter out known examples for out-of-distribution (OOD) detection. Motivated by these guidelines, we propose the Data-Driven Confidence Minimization (DCM) framework, which minimizes confidence on an \textit{uncertainty dataset}. We apply DCM to two problem settings in which conservative prediction is paramount -- selective classification and OOD detection -- and provide a realistic way to gather uncertainty data for each setting. In our experiments, DCM consistently outperforms existing selective classification approaches on 4 datasets when tested on unseen distributions and outperforms state-of-the-art OOD detection methods on 12 ID-OOD dataset pairs, reducing FPR (at TPR $95\%$) by $6.3\%$ and $58.1\%$ on CIFAR-10 and CIFAR-100 compared to Outlier Exposure.

Published in Transactions on Machine Learning Research (06/2024)
Conservative Prediction via Data-Driven Confidence Minimization
Caroline Choi
cchoil wtc.sstanford.co edu
Deportment of Computer Science Stanford University
Fahim Tajwar'
edu
Machine Learning Deportment
Cornegie Mellon University
Yoonho Lee"
yoonho sar.soo@sssstaforrde edu
Department of Computer Science Stanford University
Huaxiu Yao
huariu@cs. unc. edu
Deportment of Computer Science University of North Carolina at Chapel Hill
Ananya Kumar
smanya@@cs.stanfor...
Department of Computer Science Stanford University
Chelsea Finn
edu
Deportment of Computer Science Stanford University
Reviewed on OpenReview: https: openreview. net/ forum? id= jPCP
Abstract
In safety-critical applications of machine learning, it is often desirable for model to be conservative, abstaining from making predictions on "unknown" inputs which are not well- represented in the training data. However, detecting unknown examples is challenging, as is impossible to anticipate all potential inputs at test time. To address this, prior work (Hendrycks et al., 2018) minimizes model confidence on an auxiliary outlier dataset carefully curated to be disjoint from the training distribution. We theoretically analyze the choice of auxiliary dataset for confidence minimization, revealing two actionable insights: (1) if the auxiliary set contains unknown examples similar to those seen at test time, confidence mininization leads to provable detection of unknown test examples, and (2) if the first condition is satisfied, it is unnecessary to filter out known examples for out-of-distributio (OOD) dotoction. Motivated by these guidelines, we propose the Data-Driven Confidence Minimization (DCM) framework, which minimizes confidence on an uncertainty dataset. We apply DCM two problem settings in which conservative prediction paramount selective classification and OOD detection and provide realistic way to gather uncertainty data for each setting. In our experiments, DCM consistently outperforms existing selective classification approaches on 4 datasets when tested on unseen distributions and outperforms statc-of-the-art OOD detection methods on 12 ID-OOD datasct pairs, reducing FPR (at TPR 95%) by 6.3% and 58.1% on CIFAR-10 and CIFAR-100 compared to Outlier Exposure.
Equal contribution.

---

Published in Transactions on Machine Learning Research (06/2024)
1 Introduction
While deep neural networks have demonstrated remarkable performance on many lasks, they often fail unexpectedly (Si- monyan & Zisserman, 2014; Zhang et al., 2017). In safety- critical domains such as healthcare, such errors may provent the deployment of machine learning altogether. For example, a tumor detection model that is trained on histopathological images from one hospital may perform poorly when deployed in other hospitals due to differences in data collection methods or patient population (Koh et al., 2021). In these scenarios, it may be preferable to defer to a human expert. Conserva- live models models that can refrain from making predictions when they are likely to make an error may offer a solution.
Training Data
Input
Label
Train Model
Uncertainty Data
Input Uniform Dist
Figure 1: Data-driven confidence minimiza- tion (DCM) is a framework for training a model to make conservative predictions. DCM incorporates a regularizer that mini- mizes confidence known and unknown examples that are simi- lar to those seen at test-time.
Two fields of rescarch aim to produce conservative models: selective classification (Liu et al., 2019; Kamath et al., 2020; Huang et al., 2020) and out-of-distribution (OOD) detection (Hendrycks & Gimpel, 2016; Liang et al., 2017a; Lee et al., 2018; Liu et al., 2020). In both problem settings, inputs can be seen as belonging to one of two high-level categories: known and unknown examples. Known examples are inputs that are well-represented in the training distribution. Unknown examples include inputs belonging to a new class not seen during training (OOD detection), and misclassified inputs insufficiently covered by the training distribution (selective classification). Despite considerable research in these areas, the problem of learning a conservative model remains challenging, As the test distribution can vary in myriad of ways, it is impractical to anticipate the exact examples that will arise at test time.
unlabeled mixture of
A promising approach to OOD detection is Outlier Exposure (Hendrycks et al., 2018), which fine-tunes a pretrained model with a combined objective of standard cross-entropy on training examples and a regularizer that minimizes confidence on an auxiliary dataset, carefully curated be distinct from the training distribution. Unlabeled auxiliary data is often readily available, making it effective way of exposing the model to the types of unknown inputs it may encounter at test time.
Contrary to Outlier Exposure, which minimizes confidence on a specific choice of auxiliary dataset, we aim to better understand a broader class of approaches that minimize confidence on an uncertainty dataset and are applicable to both selective classification and OOD detection. Our theorctical analysis reveals two key guidelines for creating an effective uncertainty dataset. First, it should contain unknown examples that the model likely to encounter and misclassify at test-time. Second, in the setting of OOD detection, if the first critcria holds, then the uncortainty set can also contain known examples, climinating the need to filter out known examples as required by Hendrycks et al. (2018). In other words, it can be harmless to minimize confidence on known examples, which the model should be confident about. Our theory explains this counter-intuitive phenomenon: the effect of confidence minimization on known examples in the uncertainty set is "cancelled out" " by the cross entropy loss on training examples, while the confidence loss on unknown examples in the uncertainty set is not. We show that using such an uncertainty set provably detects unknown inputs under mild assumptions.
Building on these insights, present Data-Driven Confidence Minimization (DCM) unified approach for conservative prediction in selective classification and OOD detection. For each problem setting, we proposc a realistic and effective way to construct the uncertainty dataset that follows the two guidelines above. For selective classification, we use misclassified examples from a held-out validation set from the training distribution as the uncertainty dataset, which naturally reflects what the model is likely to misclassify at test time. For OOD dotection, we use an uncortainty datasct consisting of unlabeled examples from the test distribution, which includes both known and unknown examples. While it's not always the case that unlabeled examples from the test distribution are available, there are a number of real world applications
2

---

Published in Transactions on Machine Learning Research (06/2024)
where this is the case, such as unannotated medical data from new hospital (Sagawa et al., 2021). We visualize the DCM framework in Figure 1.
We empirically verify our approach through experiments on several standard benchmarks for selective classification and OOD detection demonstrate the effectiveness of DCM. In selective classification, DCM consistently outperforms representative approaches in conditions of distribution shift by 2.3% across distribution-shitt datasets. DCM also outperforms an ensemble of 5 models on out of datasets in AUROC, despite the 5x difference in computational cost. In the OOD detection setting, among other methods, provide comparison with Outlier Exposure (Hendrycks et al., 2018), allowing us to test choice of uncertainty dataset. DCM consistently outperforms Outlier Exposure on benchmark of 8 ID-OOD distribution pairs, reducing FPR (at TPR 95%) by 6.3% and 58.1% on CIFAR-10 and CIFAR-100, respectively. DCM also shows strong performance in challenging near-OOD detection settings, achieving 1.89% and 2.94% higher AUROC compared to the state-of-the-art.
2 Problem Setup
We consider two problem settings that test a model's ability to determine if its prediction trustworthy: selective classification and out-of-distribution (OOD) detection. In both settings, model may encounter known unknown examples at test time. Known examples are inputs that are well-represented in the training distribution; unknown examples are not.
We denote the input and label spaces as X' and V, respectively, and assume that the training dataset Dir contains known examples. In selective classification, all inputs have a ground-truth label within V, but the model may make errors due to overfitting or insufficient coverage in the training dataset Dtr- In this setting, known examples are inputs that are correctly classified by the model and unknown examples are inputs which are misclassified. In aud-of-distributton delection, the model may encounter inputs test. time that belong to new class not in its training label space V. In this setting, known examples are those from the training input space X, and unknown examples are inputs from novel classes. We first describe these problem settings in Section 2.1 and Section 2.2. In Section 3, we present two instantiations of DCM for selective classification and OOD detection.
2.1 Selective Classification
Selective classification aims to produce a model that can abstain from making predictions on unknown examples at test time. Such "rejected" inputs are typically ones that the model is most uncertain about. A model is first trained on Dur and then tested on examples that have associated ground-trute labels in the training label space y. Thus, while a perfect model trained on Dr. should correctly classify all test inputs, models often make errors new examples due to over-fitting Drr- As in prior work, we assume access to a labeled validation dataset Dval sampled from PID, which the model can use to calibrate its predictive confidence. This validation set can be easily constructed by randomly partitioning a training dataset into training and validation splits.
Models are evaluated on their ability to (1) accurately classify the inputs they do make a prediction on (i.e., accuracy), while (2) rejecting as few inputs as possible (i.e., coverage). The confidence threshold chosen to achieve desired accuracy coverage based the specific application's 's risk tolerance, which can be done using a held-out validation set. We evaluate these capabilities through metrics such as ECE, AUC, Ace@Cov, Cov@Acc. Section 6 describes these metrics and the datasets we use.
2.2 Out-of- Out-oofDDstrrbutton Distribution Detection
Out-of-distribution detection aims to distinguish between known and unknown examples al test time. We denote the ID distribution with PID, and the OOD distribution with PoOD. The test dataset is a mixture of known and unknown examples, sampled from mixture of the ID and OOD distributions Qrest + (1 PooD, where the mixture coefficient Geest is not known in advance. Given test input 2, the model produces both label prediction and measure of confidence that should be higher for inputs
3

---

Published in Transactions on Machine Learning Research (06/2024)
that are known, ID, than inputs that are unknown, OOD. Due to differences in the data distributions PID and POOD, model trained solely to minimize loss on Dir may be overconfident on unknown inputs. To address this challenge, we use an additional unlabeled dataset Du which includes both known and unknown examples. Du is sampled from a mixture of PID and POOD: where the mixture ratio au unknown to the model and can differ from Qtest- The unlabeled datasel partially informs the model about the directions of variation it may face at test time.
Models are evaluated on (1) their accuracy in classifying known examples, and (2) their capability to detect unknown examples. These are measured by metrics such as FPR@TPR, AUROC, AUPR, and ID Accuracy. Section 6 describes these metries and the ID-OOD datasct pairs we use.
3 Data-Driven Confidence Minimization
We aim lo produce a model that achieves high accuracy on the training data Dtr while having a predictive confidence that reflects the extent to which its prediction can be trusted. The crux of DCM is to introduce regularizer that minimizes confidence We refer to this auxiliary dataset as the uncertainty dataset, since it is intended to at least partly consist of examples that the model should have low confidence on.
an auxiliary datasct that is disjoint from the training datasct.
In DCM, we first pre-train a model f ; + P(Y) on the labeled training set using the standard cross-entropy loss, as in prior works (Hendrycks et al., 2018; Liu et al., 2020):
Excut (J, Dar) = E |- log f(;
(1)
(r.y)~DDrr
A model trained solely with this loss can suffer from overconfidence on unknown examples. We therefore continue to fine-tune this model on known examples, but simultaneously regularize to minimize the model's predictive confidence on an uncertainty dataset, which includes unknown examples. Specifically, we minimize cross-entropy loss on a fine-tuning dataset of known examples that includes the original training data (Dir S Dn). Our additional regularizer minimizes confidence on the uncertainty dataset Dunc:
Lcont( (f. Dume)
E |- log fya;
(2)
2 Dune
Here, Yu is a uniform target that assigns equal probability to all labels. The confidence loss Lcont is equivalent to the KL divergence between the predicted probabilities and the uniform distribution U. Our final objective is a weighted sum of the fine-tuning and confidence losses:
Exeme (J, Dx) + XLcont Dunc);
(3)
where À is hyperparameter that controls the relative weight of the confidence loss term. We find that x = 0.5 works well in practice and use this value in all experiments unless otherwise specified. Further details, such as fine-tuning duration and the number of samples in Dn and Dune: are described in Appendix C. In our experiments, we find that using an uncertainty set that is around 10% of the training set size is sufficient.
The two instantiations of DCM for OOD detection and selective classification differ only in their construction of Da and D Punes as we will describe in Section 3.2 and Section 3.1.
3.1 DCM for Selective Classification
We aim to produce model that achieves high accuracy while having low confidence on inputs that it is likely to misclassify. We expect the incorrect predictions of a model f pretrained on Dur to reflect its failure modes. Recall from Section 2.1 that we assune a held-out validation set D ~ PiD- To better calibrate its predictive confidence, we compare our pre-trained model's predictions for inputs in Dval to their ground-truth labels, and obtain the set of correct and misclassified validation examples D D In this setting, the unknown examples are the misclassified examples Dx % since they show where the model's learned decision boundary is incorrect.
4

---

Published in Transactions on Machine Learning Research (06/2024)
Algorithm DCM for Selective Classification
Input: Training data Dir Validation data val:
Algorithm 2 DCM for OOD Detection
Hyperparameter À
Input: Training data Dar, Unlabeled data Dus Hyperparameter À
Initialize weights f- 0o while Not converged do Sample mini-batch Bur Dir Update 0 using Volxent (Ber]]
Initialize weights 0 <- 0 while Not converged do Sample mini-batch Bur Dtr Update using VeCxent (f, Brr) end while
end while
Get correct set D + ((x,)) E val fo(x) y}
Get error set. D* < {(x,,)) M) Dval [o(x) + y)
while Not converged do
while Not converged do
Sample mini-batches Bur Ders Bu ~ Du Update 0 using VæLxent (f, But) + XCcont(S Bu) end while
Sample mini-batches Bur Dir U Daa Bx D Update using V VoLxent (Bu, f) + XCcout B f) end while
We set the fine- tuning datasel to be the union of the training dataset and the correctly-classified validation examples (Dn. = Dur U D and use the misclassified validation examples as the uncertainty dataset (Dunc- = Daa)) By only minimizing confidence on the misclassified examples, we expect the model to have lower confidence on all examples similar inputs which initially produced errors. We outline our approach in Algorithm
3.2 DCM for
Detection
We aim to produce a model that has low confidence on unknown inputs from the OOD distribution POOD, while achieving high accuracy on known inputs from the IDD distribution PiD- Recall from Section 2.2 that our problem setting assumes access to an unlabeled dataset Du, which includes both ID and OOD inputs: we use this unlabeled set the uncertainty dataset for reducing confidence (Dune = D.))- Intuitively, minimizing confidence Dn discourages the model from making overly confident predictions the support of the uncertainty dataset.
We minimize confidence on all inputs in D, because is not known a priori which inputs are ID versus OOD, or in our terminology, known versus unknown. While we do not necessarily want to minimize confidence on known inputs, confidence minimization expected have different effects on known and unknown inputs because of its interaction with the original cross-ente entos-y loss. On known inputs, the effect of confidence minimization is "cancelled out" by the cross-entropy loss, which maximizes the log likelihood of the true label, thus increasing the predictive confidence for that input. However, on unknown inputs, the loss is solely confidence minimization, which forces the model to have low confidence on such inputs. This allows DCM to differentiate between the ID and OOD data distributions based on predictive confidence. We will formalize this intuition in Section 4. In summary, in OOD detection, the finc-tuning dataset the training datasct (Dr= Dir); and the uncertainty dataset is the unlabeled dataset (Dunc D.). We outline our approach Algorithm 2.
4 Analysis
We now thcoretically analyze the effect of the DCM objective on known and unknown inputs. We first show that for all lest examples, the prediction confidence of DCM is a lower bound on the true confidence (Proposition 4.1). Using this property, then demonstrate that DCM can provably detect unknown examples similar to those in the uncertainty set with an appropriate threshold on predicted confidence (Proposition 4.2). Detailed statements and proofs can be found in Appendix A.
We denote the true label distribution of input æ as pz(z); this distribution need not be a point mass on a single
label. We further denote the maximum softmax probability of any distribution p as MSP(p) & max, Pt, and
denote by (z) the predictive distribution of the model that minimizes the expectation of our objective (3) with respect to the data distribution y pD():) for input Intuitively, the confidence minimization term in
5

---

Published in Transactions on Machine Learning Research (06/2024)
our objective function (3) forces the model to output low-confidence predictions on all datapoints, resulting in a more conservative model compared to one without this term. We formalize this intuition in the following proposition which relates the maximum softmax probabilities of fx and PD-
Proposition 4.1 (Lower bound true confidence). For any imput x in Du or Dir, the optimal predictive distribulion Jx salisfies MSP(At) S MSP(pn), with equality is and only if X = 0.
We note that this proposition only assumes a sufficiently expressive model class, which large neural networks often are.
Now we restrict ourselves to using an unlabeled mixture of known and unknown examples, D,, as the uncertainty set. Beyond serving as a lower bound on the true confidence, the optimum distribution PA shows how the model, after being finc-tuned to minimize confidence on the unlabcled datasct Du behaves differently for known and unknown data despite Du containing both. We denote the subset of known examples in Du as a the unknown subset as Dunk: and the 8-neighborhoods of these two sets as DÍ. Damai we give a precise definition in Appendix A. For ID inputs, the optimal predictive distribution px is determined by the weighted sum of the cross-entropy loss and the confidence loss, resulting in a mixture between the true label distribution and the uniform distribution U, with mixture weight A. On the other hand, for unknown inputs, the confidence loss is the only loss term, thus the optimal predictive distribution Pa is the uniform distribution U. This distiintt behavior allows for the detection of unknown inputs by thresholding the confidence of the model's predictions, as formalized in the following proposition.
Proposition 4.2 (Low loss implics separation). Assume D& and D are disjoint, and that each input x has only one ground-truth label, i.e., no label noise. Denote the lowest achievable loss for the objective with X >> 0 as Co- Under a mild smoothness assumption on the learned function fe, there exists e, such that ((0)- - Lo < e implies the following relationship between the mar probabilities:
inf MSP(Ja(z)) MEn
sup MSP(Jo(z)).
(4)
RED
The detailed smoothness assumption, along with all prools, can be found in Appendix A. This proposition implies that by minimizing the DCM objective (3), can provably separate out known and unknown data with an appropriate threshold on the maximum softmax probability. We note that DCM optimizes a lower bound on confidence, rather than trying to be perfectly calibrated: this easier requirement is arguably better suited for problem settings in which the model abstains from making predictions such as OOD detection and selective classification. When finc-tuning the last layers of a pre-trained network, Proposition 4.2 directly applies to feature-space distances, which are known to reflect semantic relations Upchurch et al. (2017); Wang et al. (2019).
Practical implications. Our theory suggests the following guidelines. First, the uncertainty dataset should include some unknown examples. Second, if this is true, it is unnecessary to filter out known examples for OOD detection. Under these conditions, DCM provably detects unknown examples.
5
Related Work
Selective classification. Prior works have studied selective classification for many model classes including SVM, boosting, and nearest neighbors (Hellman, 1970; Fumera & Roli, 2002; Cortes et al., 2016). Because deep neural networks generalize well but are often overconfident (Guo al., 2017; Nixon et al., 2019), mitigating such overconfidence using selective classification while preserving its generalization properties is an important capability (Geifman & El- 2017; Corbière et al., 2019; Feng et al., 2019; Kamath et al., 2020; Fisch et al., 2022). Existing methods for learning conservative neural networks rely on additional assumptions such as pseudo-labeling (Chan et al., 2020), multiple distinct validation sets (Gangrade et al., 2021), or adversarial OOD examples (Setlur et al., 2022). While minimizing the confidence of a set that includes OOD inputs has been shown to result in a more conservative model in the offline reinforeement lcarning setting (Kumar et al., 2020), this approach has not been validated in a supervised learning setting. DCM only requires a small validation set, and our experiments in Section 6 show that it performs competitively with
6

---

Published in Transactions on Machine Learning Research (06/2024)
state-of-the-art methods for selective classification, especially in the more challenging setting of distribution shift.
Out-of-distribution detection. Many existing methods for OOD detection use a criterion based on the activations or predictions of a model trained on ID data (Bendale & Boult, 2016; Hendrycks & Gimpel, 2016; Liang et al., 201 7b; Lee et al., 2018; Wei et al., 2022; Sun et al., 2022). However, the performance of these methods are often inconsistent across different ID-ÓOD dataset pairs, suggesting that the OOD detection problem is ill-defined (Tajwar et al., 2021). Indeed, separate line of work incorporates auxiliary data into the OOD detection setting; this dataset may consist of natural (Hendrycks et al., 2018; Liu et al., 2020; Mohseni et al., 2020; Tifrea et al., 2020; Chen et al., 2021; Katz-Samuels et al., 2022; Narasimhan et al., 2023) or synthetic (Lee et al., 2017; Du et al., 2022b) data. Similar to our method, Hendrycks et al. (2018) minimize confidence on an auxiliary dataset, but do so on a single auxiliary dataset of known outliers, regardless of the ID and OOD distributions, that is over 10, 000 times the size of those used by DCM. Our method leverages an uncertainty dataset which contains a mix of ID and OOD data from the test distribution, as in Tifrea et al. (2020). However, their method requires an ensemble of models to measure disagreement, while DCM uses single model. We additionally present theoretical results showing the benefit of minimizing confidence on uncortainty dataset that includes inputs from the OOD distribution. Our experiments confirm our theory, showing that this transductive setting results in substantial performance gains, even when the unlabeled set is a mixture of ID and OOD data. Our data assumptions are also shared by WOODS (Katz-Samuels et al., 2022), which leverages an auxiliary dataset containing ID and OOD examples. However, WOODS solves a constrained optimization problem to maximize OOD detection rate while keeping ID classification and OOD error rate of ID examples low, which requires several additional hyperparameters compared to DCM, which uses confidence minimization.
Data augmentation. Data augmentation is crucial for enhancing the robustness of models, particularly in uncertainty quantification and OOD detection. By generating diverse examples, augmentation exposes the model to a wider range of variations, improving generalization and OOD detection. Hafner et al. (2020) showed that synthetic augmentation siguificantly boosts OOD performance. Similarly, Hendrycks el al. (2018)
utilized various data augmentation techniques to enhance model robustness against OOD inputs. Integrating such strategics with our framework could enhance its effectivencss by providing a richer set of uncortainty data, improving the model's ability to manage uncertainty.
Recent works highlight the need for an integrated approach to handle both ID misclassifications and OOD samples effectively. Jaeger et al. (2022) show that existing methods often fail to address all relevant error types simultaneously. In this vein, Xia & Bouganis (2022) propose a method to distinguish between correctly and incorrectly classified ID samples using max- confidence scores, while also detecting OOD samples. Future work could extend DCM this problem setting.
6 Experiments
We evaluate the effectiveness of DCM for selective classification and OOD detection using several image classification datasels. Our goal is to empirically answer the following questions: (1) How does the data-driven confidence minimization loss affect the predictive confidence of the final model, and what role does the distribution of the uncertainty data play? (2) Does confidence minimization on the uncertainty dataset result in better calibration? (3) How does DCM compare to state-of-the-art methods for OOD detection and selective classification?
Metrics. Recall that the selective classification problem involves a binary classification task to predict whether the model will misclassify given example, in addition to the main classification task. Similarly, the OOD detection problem involves two classification tasks: (1) binary classification task to predict whether each example is ID or OOD, and (2) the main classification task of predicting labels of images. To ensure a comprehensive evaluation, we consider multiple metrics, each measuring the two key aspects of performance. We group the metrics below by their relevance to the selective classification (SC) or OOD detection (D) setting. These metrics are defined in detail in Appendix B:
1. ECE (SC): expected difference between confidence and accuracy, i.e., Ellp() = y f p) pl]-
7

---

Published in Transactions on Machine Learning Research (06/2024)
CIPAR-LO
Waterhinda
Charbool1
F35:W
Setting
Metlaed
Aec (1)
Ascdio0 (1)
AUC (1)
Art
Accdiin
ABCC (1)
Aux (1)
Auciiio (1)
ATC (*)
Auc (1)
Accftlo
AUC (1)
Rteemble [x]]
96.1 (0.1)"
16.9 (0.1)"
99.3 (0.1)"
97.0 (0.0)*
54.9 (0.00"
96.7 (0.0)*
91.5 (6-0)
96.5 (5.4)*
59.1 (2.7)
62.3 [0.11*
B8-4 (0.3)"
W5.5 (0.0)"
MSP
66.2 (0.1)
66:4 [0.1]
09.3 (0.1)
98.5 10.0)
10.1 (0.0)
96.7 (0.0)
81.3 81.5-12.5)
92.0 (5.9)
(3.2)
56.4 [1.5]
62.6 (0.11
51.5 (0-4)
MacLoge
56.1 (0.1)
01.5 10.13
08.9 (0.13
90.5 10.0)
55.2 (0.03
08.11 (0.0)
81.3 (7:55
99.2 (5.5)
97.3 (2.23
56.4 10.13
62.7 (0.2)
56.1 (0.2)
ID
Mieory Uneetter
Pine- Tunnng
06.2 (0.1)
50 (1:1)
98.1 [0.2]
06.4 [0:1]
98.6 [0.3]
00:3 (0:1)
16.0 (0.0)
80.3 (0.0)
89.4 (0.00
19.1 (0.0]
88.7 (0.0)
(0.0)
88.3 (0.2)
89.1.6.3) (6.5)
08.7 (0.0)
11:33 (5.90
98.8 (0.0)
07.0-11.5
56.4 10.21
18.3 (2.7)
66.3 (U:1)
6:00 (1:9)
59.3 (0-3)
52.8 (0:9)
Drep Gambhere
94.5 (0.0)
[0:1]
(0:0)
87.0 (0.0)
18.8 (0:1)
18.5 (010
87.3 (0.1)
03.5 (0:1)
99.8 (0.0)
18.5 10-4)
62: (0:9)
75.8 (0-1)
Ail-Addaeee Teatning
562 (0.0)
27.6 (0:1)
09.2 (0:0)
96.8 (0.0)
10.1 (0:1)
08.01 (010)
07:7 10.00
99.7 (0.0)
99.8 (0.0)
56.3 (0:5)
65.0 (0.5)
51 (0.3)
DCM (oum]]
942 (0.2)
06.0 ():
00.2 (0.0)
96.8 (0.0)
(0.0)
98.7 (0.0)
89.5 (3.00
(0.2)
03.5 (0.1)
50.5 (1:2)
61.2 (1.2)
52.9 (1:1)
Bowethle (x5)
(0-1)*
75.6 (1.6
[5.6)
(3.7)
(0.00)
(0.0)"
(0-5)
MaeLagg
Clossiiat
OOD
Fas-
(9.5)
17.5-05.99
Gauilers
760
(5.9)
(6.5)
(0.2)
Scll-Mdeptiee Training
(3.3)
(3.3)
86.3 (0.4)
10.4)
(0.4]
DCM (ouns)
(1.0)
86.5 (1.0)
(1:3)
78.9
Eisenabee [x6]
07.2 (6.33"
6L5 (0.3)*
15.3 [0.2)*
(5.0-10.0)
85.4 (0.01'
14.4 (0.0))
71.8 (4.8)"
74.0 (6.21"
$1.4 (6.4]"
$5.0 (0.1)"
68.6 (0.1)*
T9.5 (0.0)*
MSP
16.4 (0.1)
20G (0:2)
7u.1 (0.1)
84.3 (0.0)
88.2 (0.6)
14.4 (0.1)
63.3 (4.5)
70.4 (4.5)
(2.3
30.9 (2:7)
56.2 (0.21
74.6 (0.6)
MesLogh
26.4 (0.1)
20.4 (0:11
71. (0.1)
84.3 (0.0)
57.9 (0.0)
14.2 (01)
61.3 (4.5)
70.4 (4.5)
82.3 (3.9)
30.7 (0.11
56.2 (0.0)
74.3 (0.2)
00n
Pine- Tue-TTnnig
Hoeey Unswtttr
16.2 (0.2)
57.6 (1.1)
58.5 (0:3)
01.9 (0:3)
728 (0:2)
75 (0:1)
81.9 (0.2)
85.9 (0:5)
1900 (0.5)
57.5 (0.3)
b431 (0:2)
84.7 (0.3)
(1.5
(5.2)
75.1 (1.2)
(1.4)
81.2
82.4 (3.9)
51.8 (1:1)
51.7 (0.0)
36.0 (0:9)
36.8 (0.1)
70.6 (0.5)
76.2 (0.5)
Thep Gambhees
36.8 (0.1)
51.4 (0:1)
76.3 (0:2)
85.1 (0.3)
88.6 (0.7)
848 (0.1)
(7.17..)
73.1 (7.9)
(5.2)
51.9 30
5:9 (0:9)
18.9 (0.3)
Soll Adagere Teaining
57.1 (0.1)
51:4 [0.1)
75.3 (0:1)
80.0 (0.0)
68.9 (0.1)
95.1 (0.0)
70.3 (0.7)
71.9 (8.5)
80.3 (0.6)
51.0 (0-9)
55.1 (0-4)
76.1 (0.3)
DCM (our))
59.4 (0.1)
66.1 (0.2)
77.5 (0.2)
86.5 (0.22
89.5 (0.3)
95.0 (0.1)
78.7 (1:2)
82.5 (1-2)
91.8 (1.1)
51. (1.)
56.2 (1-4)
76-4 (1.3
Ensemble requires 5X the compute compared to other methods.
Table 1: Selective classification performance on four datasets. Numbers in parentheses represent the standard error over 3 seeds, and we bold all methods that have overlapping error with the best-performing method. DCM consistently achieves the best performance in settings with distribution shift (ID+OOD, OOD).
2. AUC (SC): area under the curve of selective classification accuracy vs coverage.
3. AccâCov (SC): average accuracy on the Cov% datapoints with highest confidence.
4. Cov@Acc (SC): largest fraction of data for which selective accuracy is above Acc.
5. FPR@TPR, (D): probability that an ID input is misclassified as OOD, given true positive rate TPR.
6. AUROC (D): area under the receiver operator curve of the binary ID/OOD classification task.
7. AUPR (D): area under the precision-recall curve of the binary ID/OOD classification task.
6.1 Selective Classification
We assess the capability of models fine-tuned with DCM to abstain from making incorrect predictions. We evaluate on several toy and real-world image classification datasets that exhibit distribution shift.
Datasets. We evaluate selective classification performance on CIFAR-10 10 (Krizhevsky et al., a) and CIFAR- 10-C (Hendrycks & Dictterich, 2019), Watorbirds (Sagawa et al., 2019; Wah et al., 2011), Camelyon17 (Koh et al., 2021), and FMoW (Koh et al., 2021). These datasets were chosen to evaluate selective classification performance the presence of diverse distribution shifts: corrupted inputs CIFAR-TO-C, spurious correlations in Waterbirds, and new domains in Camelyon17 and FMoW.
The ID/OOD/II ID/OOD/I++0OF settings for each dataset constructed follows. For CIFAR-10, the ID dataset is CIFAR-10, the OOD dataset is CIFAR-1O-C, and the ID+OOD dataset is a 50-50 mix of the two datasets. For Waterbirds, the ID dataset is the training split and the OOD dataset is a group-balanced validation set; we do not consider an ID+OOD dataset here. For Camelyon17, the ID dataset consists of images from the first 3 hospitals, which are represented in the training data. The OOD dataset consists of images from the last hospitals, which do not appear in the training set. The ID+OOD datasct mix of all five hospitals. For FMoW, the ID dataset consists of images collected from the years 2002 2013, which are represented in the training data. The OOD setting tests on images collected between 2016 2018, and the ID + OOD setting tests on images from 2002 - 2013 and 2016 - 2018.
Comparisons. We consider 7 representative prior methods as baselines: MSP (Hendrycks & Gimpel, 2016), MaxLogit (Hendrycks et al., 2022), Binary Classifier (Kamath et al., 2020), Fine-Tuning on the labeled ID validation set, Deep Gamblers (Liu et al., 2019), and Self-Adaptive Training (Huang et al., 2020), and an ensemble of 5 MSP models as a rough upper bound on performance given more compute. All methods use the same ID validation set for hyperparameter tuning and/or calibration.
8

---

Published in Transactions on Machine Learning Research (06/2024)
DCM (Ours)
SAT
Fine-Tuning
Bin. Class.
78
78
76
76
AUC
74
74
72
72
109
500
1000
2000
4000
0,005,0
2.0
5,0
Validation Set Size
Weight of Confidence Loss (1)
Figure 2: Selective classification performance of DCM on the CIFAR-10 + CIFAR-10-C task with validation set sizes (left) and various confidence loss weights X (right).
DCM outperforms prior methods when testing unseen distributions. We present representative metries in Table 1 and full metrics in Tables 15 to 17. DCM consistently outperforms all basclines in scttings of distribution shift (OOD and ID+OOD). These performance gains are altributed to DCM's confidence minimization on uncertain examples, which better prepares the model for unfamiliar inputs. DCM even outperforms Ensemble on three of the four datasets, despite requiring 1/5 of the compute. Fine- Tonn-TTning outperforms DCM when the training and validation datasets are from the same distribution (ID). In settings where the test distribution differs from the training and validation distributions, DCM outperforms Fine- Tuning on most metrics. These experiments indicate that DCM learns of distribution shift, compared to state-of-the-at methods for seleetive classification.
conservative model in conditions
DCM is robust to a range of confidence loss weights, X, and validation set sizes. We invest the sensitivity DCM to the size of the validation set in Figure (left). We find that DCM for selective classification robust to a range of validation set sizes. This robustness suggests that DCM elfectively leverages the available validation data to calibrate its confidence, maintaining performance even with varying amounts of data. In Figure 2 (right), we plot the performance of DCM with various values of X tasks constructed from the CIFAR-10 and CIFAR-1O-C datasets. We find that DCM performs best with X 0.5, indicating that this balance effectively regularizes the model without over- werrpenalizing confident predictions. This balance allows DCM to maintain high accuracy while ensuring conservative prediction on uncertain inputs.
6.2 OOD Detection
We evaluate DCM on the standard OOD detection sctting and the more challenging ncar-OOD detection setting. We evaluate three variants of DCM, each using the training objective described in Section 3, but with three different measures of confidence: MSP (Hendrycks & Gimpel, 2016), MaxLogit (Hendrycks et al., 2022), and Energy (Liu et al., 2020). We denote these three variants as DCM-Softmax, DCM-MaxLogit, DCM-Energy, and describe these variants in detail in Appendix C. All experiments in this section use =
0.5 and the default hyperparameters from Hendrycks al. (2018). Further experimental details are in Appendix D.
Datasets. We use CIFAR-10 and C10 our ID datasets and TinyImageNet, LSUN, iSUN and SVHN our OOD datasets, resulting in a total of 8 ID-OOD pairs. We split the ID data into 40,000 examples for training and 10,000 examples for validation. Our uncortainty and test sets are disjoint datascts with 5,000 and 1,000 examples, respectively. On the near-OOD delection tasks, the ID and OOD datasets consist of disjoint classes in the same dataset. The number of examples per class is the same as in the standard OOD detection sotting. For comparison on largo-scale image datasets, we use ImageNet- as ID and iNaturalist, SUN, Textures and Places as OOD datasets. Please refer to Appendix for further experimental details and the full comparison table.
9

---

Published in Transactions on Machine Learning Research (06/2024)
ID Dataset
CIFAR-10
CIFAR-100
Method
Architecture
ID Ace (1)
AUROC (*)
FPR095 (L)
ID Acc (1)
AUROC (1)
FPR095 (U)
MSP
94.7
90.7
30.9
73.9
70.3
72.1
Energy Score
94.7
91.5
33.2
73.9
76.0
66.7
MaxLogit
94.7
93.5
25.5
73.9
77.7
63.5
ODIN
94.7
94.6
24.1
73.9
84.5
53.0
Mahalanobis
94.7
93.6
27.3
73.9
37.3
Outlier Exposure
WRN-40-2
94.7
98.5
6.6
75.7
81.1
59.4
Energy Fine-Tuning
95.1
99.1
3.4
75.2
81.5
59.6
WOODS
94.7
94.8
4.1
72.7
98.0
12.9
DCM-Softmax (ous))
99.6
71.2
2.6
DCM-MaxLogii (ours)
93.6
99.8
0.7
71.2
90.4
1.7
DCM-Energy (ours)
93.6
99.7
0.3
71.2
99.5
1.3
Binary Classifier
98.9
1.3
7.6
ERD
99.5
1.0"
99.1*
2.6"
DCM-Softmax (ouss)
ResNet-11
93.4
99.5
1.9
70.9
99.1
4.6
DCM-Maxlaggi (ours)
93.4
99.5
1.5
70.9
99.2
3.5
DCM-Energy (ours)
99.5
1.4
71.0
99.3
2.3
FRD requires 3x the compute compared to other methods.
Table OOD detection performance models trained on CIFAR-10 or CIFAR-100 and evaluated on OOD
datasets. Metrics are averaged over OOD datasets; detailed dataset-specifie results are in Table 7. The three variants of DCM exhibit competitive performance all datascts.
Methods
iNaturalist
SUN
Places
Textures
FPR185 (L)
AUROC (t)
FPHE9S (L)
AUROC (1)
FPRO85 (U)
AUROC (t)
FPIL8S (U)
AUROC (t)
ID Ace (1)
MCM (zero-shot)
MSP
54.1
87.4
73.4
78.0
73.0
78.0
68.9
79.1
79.6
ODIN
30.2
91.7
54.0
87.2
55.1
85.5
51.7
87.
79.6
Energy
91.7
53.2
87.3
56.1
85.6
51.1
88.0
79.6
GradNorm
81.5
72.6
82.0
$0.4
73.7
79.4
70.3
79.6
ViM
32.2
93.2
$4.0
87.2
60.7
83.8
$3.9
87.2
79.6
KNN
29.2
91.5
35.6
92.7
39,6
91.0
64.1
85.7
79.6
VOS
94.5
43.0
41.6
56.7
86.7
VOS
29.0
94.6
36.9
92.6
38.4
91.2
61.0
86.3
79.6
NPOS
16.6
96.2
13.8
90.4
43.3
89.4
46.1
88.8
79.4
Doftmof
98.2
32.9
94.2
35.9
93.8
11.2
97.9
78.9
DCM-MaxLoogt
1.8
99.4
27.5
91.9
32.5
91.5
8.2
98.3
78.9
DCM-Energy
99.6
24.5
95.8
30.8
95.4
4.3
98.8
78.9
Table 3: OOD detection performance of ViT-B/16 with ImageNet-IK as the in-distribution training data.
Comparisons. In the standard OOD detection sctting, compare DCM with 8 representative OOD detection methods: MSP (Hendrycks & Gimpel, 2016), MaxLogit (Hendrycks et al., 2022), ODIN (Liang et al., 2017a) Mahalanobis (Lee et al., 2018), Energy Score (Liu et al., 2020), Outlier Exposure (Hendryoks et al., 2018), Energy Fine-Tuning (Liu et al., 2020), and WOODS (Katz-Samuels et al., 2022). In the more challenging near-OOD detection setting, standard methods such as Mahalanobis perform poorly (Ren et al., 2021), 80 we compare DCM with Binary Classifier and ERD (Tifrea et al., 2022), which attain state-of-the-art performance. Similar to DCM, these methods leverage an unlabeled datasot containing ID and OOD inputs. For experiments on ImageNet-1K, we compare to VOS (Du al., 2022a) and NPOS (Tao et al., 2023), prior SOTA methods that use synthetic outliers.
DCM outperforms prior methods. As expected, DCM outperforms prior methods due to provable separation of ID and OOD inputs by predictive confidence. DCM outperforms all 8 prior methods across ID-OOD dataset pairs, as shown in Table 2. For the standard OOD detection setting, we report full results in Appendix D. For ncar-OOD detoction, Table shows that DCM outperforms Binary Classifier, and performs similarly ERD with only 1/3 of the compute. DCM scales well larger tasks: Table 3 shows that DCM out performs all prior approaches ImageNet-1K well.
10

---

Published in Transactions on Machine Learning Research (06/2024)
Setting
Method
FPR (4)
FPR69 (L)
AUROC (1)
AUPR (1)
ID Ace (1)
MSP
78.6 (3.6)
94.5 (2.8)
75.7 (0.6)
38.5 (1.7)
94.9 (0.4)
Maxi.
79.2 (3.4)
94.4 (2.0)
75.5 (0.8)
40.3 (1.5)
94.9 (0.4)
ID- CIFAR-I0 [0:5]
Binary Classifier
78.6 (1.5)
94.0 (0.5)
71.8 (1.1)
79.5 (0.7)
ERD
72.5 (1.7)
92.1 (0.8)
79.3 (0.3)
47.9 (1.6)
0OD CIFAR-10 10 [5:10]
DCM-Softmax (ours)
66.0 (2.6)
89.2 (1.0)
81.2 (0.3)
45.7 (0.6)
94.0 (0.5)
DCM-MaxLLogi (ours)
67.6 (5.6)
89.2 (2.2)
81.3 (0.6)
46.1 (1.4)
94.0 (0.5)
DCM-Energy (ours)
67.3 (2.7)
89.1 (0.9)
81.4 (0.6)
46.3 (0.7)
94.0 (0.5)
MSP
68.8 (1.2)
90.9 (1.1)
75.4 (0.8)
33.4 (1.4)
78.3 (0.5)
MaxLogit
69.8 (2.0)
(1.7)
76.0 (0.5)
(1.4)
78.3 (0.5)
ID = CIFAR-100 [0:50]
Binary Classifier
89.0 (3.6)
91.8 (3.6)
61.0 (1.8)
71.7 (1.1)
ERD
75.4 (0.9)
88.8 (0.5)
71.3 (0.3)
30.2 (0.5)
OOD CIFAR-100 [50:100]
DCM-Softmax (ours)
67.3 (0.5)
86.3 (0.6)
74.3 (0.2)
32.1 (0.8)
71.8 (0.6)
DCM-MaxLogit (ours)
66.7 (1.5)
87.6 (2.5)
74.3 (0.5)
32.2 (1.7)
71.8 (0.6)
DCM-Energy (ours)
66.7 (0.5)
87.6 (1.1)
73.9 (0.2)
32.1 (0.6)
71.8 (0.6)
Table 4: Ncar-OOD detection of ResNet-18 models on the CIFAR-10 and CIFAR-100 datasets. Numbers in
parentheses represent the standard error over 5 seeds.
Pre-trained Network
Outlier Exposure
DCM
ID
ID
ID
OOD
OOD
OOD
0.2 0.4 0.6 0.8 1.0 Max Softmax Probability
0.0 0.2 0.4 0.6 0.8 1.0 Max Softmax Probability
0.0 0.2 0.4 0.6 0.8 1.0 Max Softmax Probability
Figure 3: Distribution of maximum softmax probability (left) for ID) pre-training, (middle) fine-tuning with OE, (right) fine-tuning with DCM. ID and OOD datasets are CIFAR-100 and TinylmageNet,, respectively, DCM results in (1) better separation predictive confidence for ID and OOD inputs, and (2) low predictive confidence on OOD inputs, suggesting that it learns a conservative model.
Figure 3 suggests that (1) DCM produces a conscrvative model that is only under-confident on OOD inputs, and (2) DCM better distinguishes and OOD inputs by predictive confidence than Outlier Exposure. Further ablations on the robustness DCM to X, the number finetuning epochs, and the fraction of OOD examples in the uncertainty dataset are in Appendix K.
DCM is robust to confidence weight. We fix X 0.5 for all ID-OOD dataset pairs, following prior work (Hendrycks et al., 2018; DeVries & Taylor, 2018; Hendrycks & Gimpel, 2016). While other works (Lee et al., 2017; Liang et al., 2017b) tune hyperparameters for each OOD distribution, we do not in order to test the model's ability to detect OOD inputs from unseen distributions. We plot OOD detection performance for representative ID-OOD dataset pairs with different in Figure and Figure While = 0.5 is not always optimal, we find that differences in performance due changes in are negligible. This suggests that DCM can maintain high performance without extensive hyperparameter tuning, making it more practical for worl-world applications.
Uncertainty dataset composition. We expect uncertainty datasets with a larger fraction of OOD examples to result in better separation of ID and OOD inputs. Intuitively, minimizing confidence only on OOD inputs should result the most conservative models. As expected, we observe improved performance with larger proportions of OOD examples in the uncortainty datasct for all methods. We note that DCM achieves the highest performance across all proportions. This holds for several near OOD detection tasks, as illustrated in Figure 4 (left panel) and Figure 6. DCM outperforms binary classifier, and performs similarly to ERD
11

---

Published in Transactions on Machine Learning Research (06/2024)
0.0
78
Gap to best AUROC
80
-0.2
AUROC
DCN-Eneray DCN-Sofmmax
[C10, ISUN)
70
-0.4
-0
[CI0, Timgfler)
74-.
ERD
60
Binary Classifier
-0.6
(C100, SVHN)
72-
-0.0
50
Binary Classifer
Fine Tuning
0.0
0.2
0.4 0.6
0.8
1.0
4
5
100 500 1000
2000
4000
Fraction OOD examples
Confidence weight
Validation set size
Figure 4: Robustness of DCM hyperparameters. Left: Performance of DCM on a near- -OD
detection task (CIFAR-100 [0:50] vs CIFAR-100 [50:100]) with various OOD proportions in the uncortainty dataset. Our methods, DCM-Energy and DCM-Softmax, outperform existing methods across all OOD proportions. Middle: Relative AUROC of DCM with various confidence weights X; note the negligible differences in AUROC. Right: Selective classification performance of DCM with uncertainty datascts of various sizes on CIFAR-10 + CIFAR-IO-C. These plots suggest that DCM is robust to range of confidence weights and sizes and compositions in the uncertainty dataset.
Near OUU Detection
0.00
Regulor OO0 Detection
Gap to best AUROC
Gap to best AUnOC
Gap AUROC
-0.25
-2
-2
-0.50
-0.75
-1:00
-1.25
[uss], c10 (b:10])
-5
- (C10, Timghet)
(C100 [9:53] C100 [50:100]]
[0:5], C1D (5:10))
-1.50
10
20
30
40
50
20 30
50
10-3
10
10
10
Finetunlnn epach
Finetuning epoch
Confidinne weight
Figure 5: Further ablations on robustness of DCM to hyperparameters. Left: Relative AUROC of DCM on 3 regular OOD detection sctting, where we vary the number of epochs in the second fine-tuning stage. Our default choice of 10 does not generally achieve the best performance. Middle: Similar to the plot on the left, but we experiment in the challenging near-OOD detection setting. Right: Relative AUROC of DCM where we vary the confidence weight A.
while using 1/3 the compute. This suggests that the benefits of data-driven regularization is robust to the uncertainty dataset composition.
DCM performs competitively in the transductive set- ting. We evaluate DCM with the test set the uncertainty dataset in Table 5 and Table 6. This transductive variant of DCM still performs competitively to prior methods. However, there is slight drop in performance compared to standard version of DCM due to minimizing confidence on test ID inputs.
CIFAR- 10 [0:5] vs CIFAR 10 (5:10)
90
80
AUROC
70
-0 DCM
60
DCM-Energy
7 Conclusion
ERD
50
Binary Classifier
In this work, we propose Data-Driven Confidence Minimization (DCM), which trains models to make conservative predictions by minimizing confidence on an uncertainty dataset.
0.0
0.2
0.4 0.6
0.8
1.0
Fraction of OOD examples
Figure 6: Performance of DCM on CIFAR-10 [0:5] vs CIFAR-10 [5:10] near-OOD detection task with various OOD proportions in the uncertainty dataset. The test dataset is fixed with 2500 ID and 500 OOD examples and is disjoint from the uncertainty dataset.
Our empirical results demonstrate that DCM can lead to more robust classifiers, particularly in conditions of distribution shift. In our experiments, DCM consistently outperformed statc-of- the-art methods for ivlective classification and OOD detection. We believe that the theoretical guarantees and strong empirical performance of DCM represents promising step towards building more robust and reliable machine learning systems in safety-critical scenarios.
12

---

Published in Transactions on Machine Learning Research (06/2024)
SVHN
TinyImagoNel
LSUN
iSUN
Method
Setting
AUROC
FPRØ95
AUROC
FPR
AUROC
FPR
AUROC
FPR
DCM-Softmax
Regular
99.5 (0.2)
1.0 (0.6)
99.3 (0.1)
4.1 (1.3)
99.7 (0.1)
0.9 (0.3)
99.5 (0.1)
1.7 (0.4)
Transductive
99.8 (0.1)
0.4 (0.4)
98.8 (0.3)
6.5 (2.0)
99.2 (0.3)
4.2 (1.5)
99.2 (U.1)
4.9 (1.3)
DCM-MaxLogit
Regular
99.5 (0.1)
0.9 (0.3)
99.3 (0.1)
2.7 (0.8)
99.8 (0.1)
0.8 (0.4)
99.4 (0.1)
1.5 (0.6)
Transductive
99.9 (0.1)
0.3 (0.3)
98.8 (0.2)
5.9 (1.9)
99.3 (0.2)
3.6 (1.3)
99.2 (0.1)
4.6 (1.3)
DCM-Fnergy
Regular
99.5 (0.2)
0.6 (0.5)
99.3 (0.1)
(1.0)
99.8 (0.1)
0.4 (0.1)
99.5 (0.1)
(0.3)
Transductive
99.9 (0.1)
0.2 (0.2)
98.9 (0.2)
5.2 (1.8)
99.4 (0.2)
2.5 (0.8)
99.3 (0.1)
3.5 (0.5)
Table 5: Comparison between the regular and transductive sctting peformance of our method for ResNect-18 models trained on CIFAR-10.
SVHN
Thny ImtgeNet
LSUN
ISUN
Method
Setting
AUROC (t)
FPR005 (L)
AUROC (1)
FPR890 (4)
AUROC (t)
FPR005 (1)
AUROC (1)
FPR305 (U)
DCM-Sofamxx
Reyular
90.3 (0.1)
2.5 (1.4)
98.7 (0.3)
7.8 (2.5)
99.4 (0.2)
1.6 (1.5)
98.8 (0.4)
6.3 (3.3)
Transductive
99.3 (0.4)
2.8 (2.5)
97.6 (0.4)
16.3 (4.6)
98.3 (0.9)
9.3 (7.9)
97.9 (1.2)
12.0 (8.2)
DCM-Mtssl.ogtt
Regular
89.2 (0.1)
3.7 (0.6)
98.8 (0.2)
6.4 (1.8)
99.6 (0.1)
0.7 (0.3)
99.2 (0.2)
3.1 (1.7)
Trausductive
(0.4)
1.6 (1.8)
(0.3)
14.8 (1.4)
(0.8)
7.7 (5.9)
(0.9)
(6.3)
ACM-Eaergy
Regular
89.5 (0.1)
1.0 (0.6)
99.0 (0.3)
4.9 (2.3)
99.6 (0.2)
0.8 (0.7)
99.2 (0.3)
2.4 (0.9)
Transdurtive
90.5 (0.3)
1.4 (1.6)
97.8 (0.3)
11.9 (5.1)
98.7 (0.5)
5.3 (3.5)
98.7 (0.4)
6.1 (3.5)
Table 6: Comparison between the regular and transductive setting peformance of our method for Nes-et-18 models trained on CIFAR-100.
The requirement of an uncertainty dataset that covers regions that the model may mis-classify can preclude some applications. Furthermore, the theoretical guarantees for DCM only apply inputs that are represented by the uncertainty dataset and DCM requires separate fine-tuning for each different. test distribution. Future work can develop better methods for gathering or constructing uncertainty datasets to make the framework more widely applicable and increase performance. It would also be interesting to extend DCM to the problem of selective classification with OOD detection (Jaeger et al., 2022; Xia & Bouganis, 2022).
13

---

Published in Transactions on Machine Learning Research (06/2024)
References
Peter Bandi, Oscar Geessink, Quirine Manson, Marcory Van Dijk, Maschenka Balkenhol, Meyke Hermsen, Babak Ehteshami Bejnordi, Byungjae Lee, Kyunghyun Paeng, Acxiao Zhong, et al. From detection of individual metastases to classification of lymph node status at the patient level: the camelyon17 challenge. IEEE transactions on medical imaging, 38(2)550-5600 2018. [page 31]
Abhijit Bendalc and Terrance E Boult. Towards open set deep networks. In Proceedings of the IEEE conference on compuler vision and pallern recognilion, pp. 1563 1572, 2016. [page 7]
Clément L. Canonne. A short note on an inequality between kl and Lv, 2022. [page 19]
Alex Chan, Ahmed Alaa, Zhaozhi Qian, and Mihaela Van Der Schaar. Unlabelled data improves Bayesian uncertainty calibration under covariate shift. In Hal Daumé III and Aarti Singh (eds.), Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pp.
PMLR, 13-18 Jul 2020. [page 6]
Jieleng Chen, Yixuan Li, Xi Wu, Yingyu Liang, and Somesh Jha. Atom: Robustifying out-of-distribution detection using outlier mining. In Machine Learning and Knowledge Discovery in Databases. Research Track: European Conference, ECML PKDD 2021, Bilbao, Spain, September 13-17, 2021, Proceedings, Part III 21, pp.
Springer, 2021. [page 7]
Mircea Cimpoi, Subhransu Maji, Iasonas Kokkinos, Sammy Mohamed, and Andrea Vedaldi. Describing textures in the wild, 2013. [page 27, 28]
Charles Corbière, Nicolas Thome, Avner Bar-Hen, Matthieu Cord, and Patrick Pérez. Addressing failure prediction by learning model confidence. Advances in Neural Information Processing Systems, 32, 2019.
[page 6]
Corinna Corles, Giulia DeSalvo, and Mehryar Mohri. Boosting with abstention. Advances in Newral Information Processing Systems, 29, 2016. [page 6]
Francesco Croce, Maksym Andriushchenko, Vikash Sehwag, Edoardo Debenedetti, Nicolas Flammarion, Mung Chiang, Prateck Mittal, and Matthias Hein. Robustbench: standardized adversarial robustness benchmark. arXiv preprinl ar Xix:2:0010 0. 09670, 2020. [page 31, 32]
Jia Deng, R. Socher, Li Fei-Fei, Wei Dong, Kai Li, and Li-Jia Li. Imagenet: A large-scale hierarchical image database. In 2009 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), volume 00, pp. 248 255, 06 2009. doi: 10.1109/ 10.1109/CVPR.20000 CVP...
[page 24, 28]
Terrance DeVries and Graham W Taylor. Learning confidence for out-of-distribution detection in neural networks. arXiv preprint XrX:x:1802.0 04865, 2018. [page 11]
Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image worth 16x16 words: Transformers for image recognition at scale, 2021. Ipage 28]
Xuefeng Du, Zhaoning Wang, Mu Cai, and Sharon Li. Towards unknown-aware learning with virtual outlier synthesis. In International Conference on Learning Representations, 2022a. [page 10, 27, 28]
Xuefeng Du, Zhaoning Wang, Mu Cai, and Yixuan Li. Vos: Learning what you don't know by virtual outlier synthesis. arXiv preprint ar 220. 2022b. [page 7]
Xuefeng Du, Yiyou Sun, Xiaojin Zhu, and Yixuan Li. Dream the impossible: Outlier imagination with diffusion models, 2023. [page 27]
Jean Feng, Arjun Sondhi, Jessica Perry, and Noah Simon. Selective prediction-se models with coverage guarantees. Niu preprint ar Xrxo 1906. 05473, 2019. [page
14

---

Published in Transactions on Machine Learning Research (06/2024)
Adam Fisch, Tommi Jaakkola, and Regina Barzilay. Calibrated selective classification. arXiv preprint or 2rv: 1.e.1.20000 12084, 2022. [page 6]
Stanislav Fort, Jie Ren, and Balaji Lakshminarayanan. Exploring the limits of out- out-of-distributio detection. In A. Beygelzimer, Y. Dauphin, P. Liang, and J. Wortman Vaughan (ods.), Advances in Neural Information Processing Systems, 2021. [page 28]
Giorgio Fumera and Fabio Roli. Support veclor machines with embedded reject option. Pullern Recognition with Support Vector Machines: First International Workshop, SVM 2002 Niagara Falls, Canada, August 10, 2002 Proceedings, pp. 68-82. Springer, 2002. [page 6]
Aditya Gangrade, Anil Kag, and Venkatesh Saligrama. Selective classification via one-sided prediction. In International Conference on Arlificial Intelligence and Statistics, pp.
PMLR, 2021. [page 6]
Yonatan Geifman and Ran EI- Yaniv. Selective classification for deep neural networks. Advances in neural information processing systems, 30, 2017. [page 6]
Chuan Guo, Gcoff Plciss, Yu Sun, and Kilian Q Weinberger. On calibration of modern neural networks. International conference on machine learning, pp. 1321 1330. PMLR, 2017. [page 6)
Danijar Hafner, Dustin Tran, Timothy Lillicrap, Alex Irpan, and James Davidson. Noise contrastive priors for functional uncertainty. In Uncertaindy in Artificial Intelligence, pp. 905-9144 9149.. PMLR, 2020. [page 7]
Kaiming Hc, Xiangyu Zhang, Shaoqing Ron, and Jian Sun. Deep residual lcarning for image recognition, 2015. [page 26]
Martin E. Hellman. The nearest neighbor classification rule with a reject option. IEEE Transactions on Systems Science and Cybernetics, 6(3):179-18) 185, 1970. doi: DL.1099/SSS..190.3000000 [page 6)
Dan Hendrycks and Thomas Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. arXie preprint arXiv:1903, 12261, 2019. [page 8, 31]
Dan Hendrycks and Kevin Gimpel. A baseline for detecting misclassified and dutto--distribution examples in
neural networks. arXic preprint orXiv:1610. 02136, 2016. [page 2, 7, 8, 9, 10, 11, 22, 23, 24, 28, 31]
Dan Hendrycks, Mantas Mazeika, and Thomas Dietterich. Deep anomaly detection with outlier exposure. arXiv preprint ar Xix:::1812. 04606, 2018. [page 1, 2, 3, 4, 7, 9, 10, 11, 23, 25, 32]
Dan Hendrycks, Steven Basart, Mantas Mazcika, Andy Zou, Joseph Kwon, Mohammadreza Mostajabi, Jacob Steinhardt, and Dawn Song. Scaling tuttof-distribution detection for real-world settings. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvari, Gang Niu, and Sivan Sabato (eds.), Proceedings of the 39th International Conference on Machine Learning, volume 162 Proceedings of Machine Learning Research, pp. 9759-8773 PMLR, 17-23 Jul 2022. [page 8, 9, 10, 22, 23, 31]
Grant Van Horn, Oisin Mac Aodha, Yang Song, Yin Cui, Chen Sun, Alex Shepard, Hartwig Adam, Pietro Perona, and Serge Belongic. The inaturalist species classification and detection dataset, 2018. [page 28]
Lang Huang, Chao Zhang, and Hongyang Zhang. Self-adaptive training: beyond empirical risk minimization. Advances in neural information processing systems, 33:19365-19376, 2020. [page 2, 8, 31]
Rui Huang, Andrew Geng, and Yixuan Li. On the importance of gradients for detecting distributional shifts in the wild, 2021. [page 28]
Paul F Jaeger, Carsten T Lüth, Lukas Klein, and Till Bungert. A call to reflect on evaluation practices for failure detection in image classification. arXiv preprint arXim:2211.120 15259, 2022. [page 7, 13]
Amita Kamath, Robin Jia, and Percy Liang. Selective question answering under domain shift. arXiv preprint XxXx:2000600462, 2020. [page 2, 6, 8, 31]
15

---

Published in Transactions on Machine Learning Research (06/2024)
Julian Katz-Samuels,, Julia B Nakhleh, Robert Nowak, and Yixuan Li. Training OOD detectors in their natural habitats. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvari, Gang Niu, and Sivan Sabato (eds.), Proceedings of the 39th International Conference on Machine Learning, volume 162 of [page 7, 10, 23]
Proceedings of Machine Learning Research, pp. 10848-10865. PMLR, 17-23 Jul 2022.
Pang Wei Koh, Shiori Sagawa, Henrik Markhund, Sang Michael Xie, Marvin Zhang, Akshay Balsubramani, Weihua Hu, Michihiro Yasunaga, Richard Lanas Phillips, Irena Gao, et al. Wilds: A benchmark of in-the-wild distribution shifts. In International Conference on Machine Learning, pp. 3637-5664 PMLR, 2021. [page 2, 8, 31, 32, 33]
Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton. Cifar-10 (canadian institute for advanced research). [page 8, 24, 31]
Alex Krizhovsky, Vinod Nair, and Geoffrey Hinton. Cifar-100 (canadian institute for advancod research). b. [page 24]
Aviral Kumar, Aurick Zhou, George Tucker, and Sergey Levine. Conservative q-learning for offline reinforce- ment learning. Advances in Newral Information Processing Systems, 33:1179-111 1191,, 2020. [page 6]
Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. Simple and scalable predictive uncertainty estimation using deep ensembles. Advances in neural information processing systems, 30, 2017. [page 31]
Ya Le and Xuan S. Yang. Tiny imagenet visual recognition challenge. 2015. [page 24]
Kimin Lee, Honglak Lee, Kibok Lee, and Jinwoo Shin. Training caafdennce-aliibraeed classifiers for detecting out-of-distribution samples. Xiv preprint arXiu:1711 19tt:1111.99. 2017. [page 7, 11]
Kimin Lee, Kibok Lee, Honglak Lee, and Jinwoo Shin. A simple unified framework for detecting out-of- distribution samples and adversarial attacks, 2018. [page 2, 7, 10, 23]
Shiyu Liang, Yixuan Li, and R. Srikant. Principled detection of out-of-distributioo examples neural networks. CoRR, abs/1706.02690, 2017a. [page 2, 10, 23, 24, 27, 28]
Shiyn Liang, Yixuan Li, and Rayadurgam Srikant. Enhancing the reliability of out-of-distribution image detection in neural networks. arXiv preprint arXiv:1 706. 006.02690, 2017b. [page 7, 11]
Weitang Liu, Xiaoyun Wang, John Owens, and Yixuan Li. Energy-based out-of-distribution detection. Advances in Neural Information Processing Systems, 33:21464-21475 2020. [page 2, 4, 7, 9, 10, 23, 24, 28]
Ziyin Liu, Zhikang Wang, Paul Pu Liang, Russ R Salakhutdinor, Louis-Philipp Morency, and Masahito Ueda. Deep gamblers: Learning to abstain with portfolio theory. Advances in Newral Information Processing Systems, 32, 2019. [page 2, 8, 31, 32]
Yifei Ming, Ziyang Cai, Jiuxiang Gu, Yiyou Sun, Wei Li, and Yixuan Li. Delving into distofiiittinnution detcction with vasion-language representations. In Alice H. Oh, Alckh Agarwal, Danielle Belgrave, and Kyunghyun Cho (eds.), Advunces in Neural Information Processing Systems, 2022. [page 28]
Sina Mohseni, Mandar Pitalc, JBS Yadawa, and Zhangyang Wang. Self-supervised learning for generalizable detection. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pp. 5216-5223, 2020. [page 7]
Harikrishna Narasimhan, Aditya Krishna Menon, Wittawat Jitkrittum, and Sanjiv Kumar. Plugin estimators for selective classification with out-of-distribution detection, 2023. [page 7]
Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y. Ng. Reading digits in natural images with unsupervised feature learning, In NIPS Workshop on Deep Learning and Unsupercised Feature Learning 2011, 2011. [page 24, 27]
Jeremy Nixon, Michael W Dusenberry, Linchuan Zhang, Ghassen Jerfel, and Dustin Tran. Mcasuring calibration in deep learning. In CVPR workshops, volume 2, 2019. [page
16

---

Published in Transactions on Machine Learning Research (06/2024)
Mark S Pinsker. Information and information stability of random voriables and processes. Holden-Day, 1964.
[page 19]
Jie Ren, Stanislav Fort, Jeremiah Z. Liu, Abhijit Guha Roy, Shreyas Padhy, and Balaji Lalshminarayanan. A simple fix to mahalanobis distance for improving near-ood detection. CoRR, abs/2106.090022, 2021.
[page 10]
Shiori Sagawa, Pang Wei Koh, Tatsunori Hashimoto, and Percy Liang, Distributionally robust neural networks for group shifts: On the importance of regularization for worst-case generalization. arXiv preprint arXiv:1911.08770 2019. [page 8, 31, 32)
Shiori Sagawa, Pang Wei Koh, Tony Lee, Irena Gao, Sang Michael Xie, Kendrick Shen, Ananya Kumar, Weihua Hu, Michihiro Yasunaga, Henrik Marklund, et al. Extending the wilds benchmark for unsupervised adaptation. arXiv preprint arXiv:21 1xX0:0012.05000, 2021. [page 3]
Amrith Sctlur, Benjamin Eysenbach, Virginia Smith, and Sergey Levine. Adversarial unlearning: Reducing confidence along adversarial directions. arxie preprint arXiv:2206.0130 2022. [page 6]
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint Xt:: 1556, 2014. [page 2]
Yiyou Sun, Yifei Ming, Xiaojin Zhu, and Yixuan Li. Out-of-distribution detection with deep nearest neighbors.
In International Conference on Machine Learning, pp. 20827-20844 PMLR, 2022. |page 7, 28]
Christian Szegedy, Vincent Vanhoucke, Sergey loffe, Jonathon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision, 2015. [page 29, 33]
Fahim Tajwar, Ananya Kumar, Sang Michael Xie, and Percy Liang. No true state-of-the-art? ood detection methods are inconsistent across datasets. arXiv preprint arXie:2109.05540 2021. [page 7, 24]
Leitian Tao, Xuefeng Du, Jerry Zhu, and Yixuan Li. Non-parametric outlier synthesis. Tn The Fleventh International Conference on Learning Representations, 2023. [page 10, 27, 28]
Alexandru Tifrea, Eric Stavarache, and Fanny Yang. Novelty detection using ensembles with regularized disagreement. arXiv preprint arXiv:2012.058 2020. [page 7]
Alexandru Tifrea, Eric Stavarache, and Fanny Yang. Semi-supervised novelty detection using ensembles with regularized disagreement. In Uncertainty in Artificial Intelligence, pp. 1939-1948, PMLR, 2022. [page 10, 26, 27]
Antonio Torralba, Rob Fergus, and William T. Freeman. 80 million tiny images: A large data set for nonparametric object and scene recognition. IEEE Transactions Pattern Analysis and Machine Intelligence, 30(11):1958-1970, 2008. doi: (0.1109/TPAM..2000 128. [page 24]
Paul Upchurch, Jacob Gardner, Gcoff Pleiss, Robert Pless, Noah Snavely, Kavita Bala, and Kilian Weinberger. Deep feature interpolation for image content changes. In Proceedings of the IEEE conference on compuler vision and pattern recognition, pp. 7064-7073 2017. [page 6]
Sagar Vaze, Kai Han, Andrea Vedaldi, and Andrew Zisserman. Open-set recognition: A good closed-set classifier is all you need. In International Conference on Learning Representations, 2022. [page 22, 23]
Catherine Wah, Steve Branson, Peter Welinder, Pietro Perona, and Serge Belongie. The caltech-ucsd birds-200-2011 datasct. 2011. [page 8, 31]
Haoqi Wang, Zhizhong Li, Litong Feng, and Wayne Zhang. Vim: Out-of-distributiio with virtual-logit. matching. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2022. [page 28]
Yulin Wang, Xuran Pan, Shiji Song, Hong Zhang, Gao Huang, and Cheng Wu. Implicit semantic data augmentation for deep nerworks. Advances in Neural Information Processing Systems, 32, 2019. [page 6]
17

---

Published in Transactions on Machine Learning Research (06/2024)
Hongxin Wei, Renchunzi Xie, Hao Cheng, Lei Feng, Bo An, and Yixuan Li. Mitigating neural network overconfidence with logit normalization. In International Conference on Machine Learning, pp. 23631-23644 PMLR, 2022. [page 7]
Guoxuann Xia and Christos-Savvas Bouganis. Augmenting softmax information for selective classification with out-of-distribution data. In Proceedings of the Asian Conference Computer Vision, pp. 1995-2012, 2022. [page 7, 13]
Jianxiong Xiao, James Hays, Krista A. Ehinger, Aude Oliva, and Antonio Torralba. Sun database: Large-scale scene recognition from abbey to zoo. In 2010 IEEE Computer Sociely Conference on Compuler Vision and Pattern Recognition, pp. 3485-3492, 2010. doi: 211100//VVR.2000.5.555
ppage 28)
Pingmei Xu, Krista A Ehinger, Yinda Zhang, Adam Finkelstein, Sanjeev R. Kulkarni, and Jianxiong Xiao. Turkergaze: Crowdsourcing saliency with webcam basod eye tracking, 2015. |page 24, 27]
Fisher Yu, Yinda Zhang, Shuran Song, Ari Seff, and Jianxiong Xiao. Lsun: Construction of a large-scale image dataset using deep learning with humans in the loop. arxiv preprint arXiv:1506. 03365, 2015. [page 24, 27]
Sergey Zagoruyko and Nikos Komodakis. Wide residual networks, 2016. [page 24]
C Zhangg Bengio, M Hardt, B Recht, and Vinyals. Understanding deep learning requires rethinking generalization. 5th International Conference on Learning Representations (ICLR), 2017. [page 2]
Bolci Zhou, Agata Lapedriza, Aditya Khosla, Aude Oliva, and Antonio Torralba. Places: A 10 million image database for scene recognition. IEEE tronsactions on pallern analysis and machine intelligence, 40(6): 1452-1464, 2017. [page 27, 28, 31]
18

---

Published in Transactions on Machine Learning Research (06/2024)
A Theoretical Analysis
In this section provide simple theoretical setup for algorithm. First, show algorithm perfectly detect unknown examples when the known examples in the lest set also appears in this training set. Next, we show that under the assumptions of function smoothness and closeness of known train and test examples in the input space, this also holds for unseen known and unknown examples.
A.1 Problem Setting
Let X' be the imput space and y the label space. Let PID be a distribution over x (1...., CJ X x ie., there are C classes, and let Dir be training dataset consisting of datapoints sampled from PID- We train classifier fo X + [0, _f on the training data. We also consider a different distribution POOD over X y that is different from PiD (the OOD distribution). Let Du be unlabeled test set where half the examples are sampled from PID, the other half are sampled from POOD. Our objective is to minimize the following loss function:
((0)
E Du,
Xeem (fo(x) + E (F(o)()(()))), x.
5
where À 0, fxent is the standard cross-entropy loss, and Leon confidence loss which is calculated as the cross-cntropy with respect to the uniform distribution over the C classes. We focus the maximum softmax probability MSP(p) max; measure of confidence in a given categorical distribution p.
A.2 Simplified Setting: known Examples Shared Between Train and Unlabeled Sets
We start with the following lemma which characterizes the interaction of our loss function (3) with a single datapoint.
Proposition A.1 (Lower bound on true confidence). Let p be the true label distribulion of impul x. The minimum of the objective function (3) achieved when the predicted distribution is Pa A p+\2 For all x wilhin Du and Der, the optimal distribution px salisfies MSP(px) S MSP(p), with equality iff =
1+X x
Proof. Denote the prodicted logits for input x as 2 E RC, and softmax probabilities as = e /
Ee E [0. 1|. & 82
The derivative of the logits with respect to the two loss terms have the closed-form expressions
Exent 8 8-p. p,
dz Loon = - Setting the derivative of the overall objective to zero, we have
0 (Cxent + X.Coo) = - -
p =0- 1+1
1 -
x = PA
(6)
Oz
To chock the lower bound property, note that Px is a combination of p and the uniform distribution U, where U is the uniform distribution over the C classes and has the lowest possible MSP among all categorical distributions over C classes.
The resulting predictive distribution px can alternatively be seen as Laplace smoothing with pseudocount X applied to the true label distribution p. This new distribution can be seen "conservative" in that it (1) has lower MSP than that of p, and (2) has entropy greater than that of p-
Lemma A.2 (Pinsker's incquality). If and Q are two probability distributions, then
6TV () S V Q),
(7)
where STv(P,Q) is the total variation distance between P and Q.
Proof. Refer to (Pinsker, 1964; Canonne, 2022) for detailed proof.
7
19

---

Published in Transactions on Machine Learning Research (06/2024)
Lemma A.3 (Low loss implics separation, transductive case). Assume that all known eramples in Du are
also in Dir, and that Din O Dout = Ø5 Let D = {æ Diest ~ {=n Direin) and Deest = =xx E D a ~ Dout = Dlest D Dtrain, Let Lo be the lowest achievable loss for the objective (3) with À > 0. Then there ezists c > O such that C(t) - Lu < implies the following relationship between the max probabilities holds:
min MSP(Jo(z)) xED
>
max MSP(Jo(z)) ZED trat
Proof. Since the training set is subset of the unlabeled set, rearrange the objective (3) 88
( (
[ (fo(z). + ACcon (fo(=))) DEDtest
(ACcon(f((2))
(9)
Note that the first term is the cross-entropy between fo(x) and Pa cross-entropy between fa(x) and the uniform distribution U. We now rearrange to see that
p+1d 1+A and the second term is the
((0) - Co =
[DKLlP Il fe(x))
E xED!eat out
[U fo(x))).
(10)
(2.0)E
where the lowest achievable loss Lo is obtained by setting Sa(x) = Pa for known inputs and fa(x) = U for unknown inputs. Because L - Lo < we know that (KL(PX || fe(z)) < Ne for all known inputs and (K Il fe(x)) < Nc for all unknown inputs.
By Lemma A.2, we have for known input x
Ne By the triangle inequality and because MSP is 1-Lipschitz with respect to output probabilities, we have for known inputs
(rl(x,)o(a)) / DRI(Px II [o(x))
(11)
Ne 1 A 1 Ne
MSP(fe(z)) 2 MSP(p)) V 1+1
(12)
1+AC
V
Similarly, by Lemma A.2, we have for unknown input x
(Tv(U, s / DKL [o(x))
Ne
(13)
By the triangle inequality and because MSP is 1-Lipschitz with respect to output probabilities, we have for all unknown inputs
Ne
Ne
MSP( S MSP(U)+
+
(14)
2
C
2
Letting
1 2N
C-1 (1+X)C
have
1 A
N 1
No
min MSP(fo(z))
V 7 +
max MSP(fo(x)).
(15)
zE Dteat
Y+I 1+AC
C
2
ZE Dteat
Lemma A.3 shows that the transductive sctting, minimizing our objective L(0) (3) below some threshold provably leads a separation between known and unknown examples in terms of the maximum predicted probability for each example.
20

---

Published in Transactions on Machine Learning Research (06/2024)
A.3 More general setting
We prove more general version of the claim in Lemin A.3 which applies to datapoints outside of the given dataset Diest, Our theorem below depends only on a mild smoothness assumption on the learned function.
Proposition A.4 (Low loss implies separation). Assume that all known examples in Du are also in Dir, and that Din n Dut = Ø. Let Dis = {I E Drest x ~ Din {= Dtrain) and De = {z E Dtest I ~ Doutt = Dleat D Dtrain, Assume that the classifier Je + [0, 1] is KLAischhilz continuous for all 0, i.e., for all for some constant > O. Let Co be the lowest achievable loss for the objective (3) with O. For ó > 0, denote the wnion of 5-balls around the known and unknown datapoints
2, a, E X, [l)f(()) fo(x')llo I =d(xzz²)
D A fo/3xr E Drest s.t. d(x,,') < <6), D {x|3x's E D s.t. d(x, x') < 6). in
(16)
Then there erists c, 0 such that L(A) Lo implies the following relationship between the mar probabilities holds:
MSP(ff(z))> > sup MSP(fo(x))
(17)
DED
z EED out
Proof. By Lemma A.3, we have for some min MSP(fo(z)) > max MSP(fe denote the difference these two terms as
Fix e and
min MSP(fo(z)) DEDieu
max MSP(Fo(z)) A. DEDies!
(18)
For any af E D and a Do let Fin Diest Fout E Dleat satisfy d(w Rim) < 6 and d( Tout) <.
By the K K-Lipschitz property, have
MSP(fo(1..) 2 MSP(fo(Zin) - K5, MSP(fo(Feut) & (SP(( + Kō.
(19)
Sctting 8 << A
2K we have
MSP()o(Z..) 2 MSP(Sa(Zmn) - K8 > (SP()e()mmn)) + K8 2 (S
(20)
Since the choice ain and shu was arbitrary, the equation above holds for all datapoints inside each 6-ball. Therefore, we have
inf MSP(fo(z)) RE
sup MSP(fo(z)).
(21)
D Dut
B Metrics
B.1 OOD Detection
We first define precision, recall, true positive rate and false positive rate. Let TP and FP denote the number of examples correctly and incorrectly classified as positive, respectively. Similarly, let TN and FN denote the number of examples correctly and incorrectly classified negative, respectively.
Precision is defined the fraction of correctly classified positive examples, among all examples that classified positive.
TP
Precision
TP + FP
Recall (also referred to true positive rate (TPR)) is defined the fraction of correctly classified positive examples among all positive examples.
TP
Recall
TP FN
21

---

Published in Transactions on Machine Learning Research (06/2024)
False positive rate (FPR) is defined as
FP FP TN
FPR
We the following metrics to evaluate OOD detection performance.
1. AUROC:
The receiver operating characteristic (ROC) curve is obtained by plotting the true positive rate vs the false positive rate at different thresholds. AUROC is the area under the ROC curve. AUROC is always between and 1; the AUROC random and a perfect classifier 0.5 and 1.0 respectively. The higher the AUROC, the better.
2. AUPR:
The precision-recall (PR) curve is obtained by plotting the precision and recall of classifier different threshold settings. AUPR is the area under this PR curve. Similar to AUROC, higher AUPR implics better classifier. See that AUPR would be different based whether positive or vere-versa. In this context, AUPR-In and AUPR-Out refers to AUPR calculated using the convention of denoting ID and OOD) examples as positive respectively. If not mentioned otherwise, AUPR in this paper refers to AUPR-Out.
label the ID examples
3. FPROTPR: This metric represents the false positive rate of the classifier, when the decision threshold is chosen such that true positive rate is TPR%. Typically, we report FPR@95 our paper, following prior work such Hendrycks et al. (2022).
B.2 Selective Classification
1. ECE: The expected calibration error (ECE) measures the calibration of the classifier. It is calculated the expected difference between confidence and accuracy, i.e., H[[p( = y P p) pp].
2. Acc@Cov: This metric measures the average accuracy of a fixed fraction of most confident datapoints. Specifically, we calculate the averago accuracy on the Cov% datapoints with highest confidence.
3. Cov@Acc: This metric measures size of the largest subset that achieves a given average accuracy.
Specifically, we calculate the largest fraction of data for which selective accuracy above Acc.
4. AUC: The area under the curve of selective classification accuracy vs coverage.
C
Variants of DCM for OOD Detection
For OOD detection, experiment with three different scoring methods top of DCM. Concretely, we denote the input space as X' and assume that our ID) distribution has C classes. Further, let f X - B represent our model, and S : X + I represent a score function. Then OOD detection becomes a binary classification problem, where we use the convention that OOD examples are positive and ID examples are negative. During test time, we would choose threshold y and for x E X, we say æ is OOD S(x) 2 7, and x is classified as ID otherwise. We experiment with three commonly used choices for the score function, S.
1. Maximum softmax score (MSP) (Hendrycks & Gimpel, 2016; Vaze et al., 2022): For class E (1,...;C) C), the softmax score, St (x) is defined as:
Sion (x) = exp exp(((x))
E exp (f)(
The MSP score is defined as:
SMPP (1:
Si (x)
iE(L...,C)
Here the negative signs comes due convention of labeling OOD examples positive.
22

---

Published in Transactions on Machine Learning Research (06/2024)
2. MaxLogit (Hendrycks et al., 2022; Vaze et al., 2022): Instead of using the softmax probabilities, we use the maximum of the model's un-normalized outputs (logits) as the score. Formally,
maxxlogie (x)
max (x)
iEl....
3. Energy (Liu et al., 2020): The energy score is defined as follows:
Senergy (x) - log Σ (a))
We see in our experiments that all three scores, when combined with DCM framework, performs similarly, with Energy score giving slightly better performance.
Detailed OOD Detection Results in the Regular Setting
D.1 Basclines
We compare DCM against several prior OOD detection methods.
MSP (Hendryeks & Gimpel, 2016; Vaze el al., 2022): A simple baseline for OOD detection, where take network trained on ID samples and threshold on the network's maximum softmax probability prediction test example to separate ID and OOD examples.
Max Logit (Hendrycks et al., 2022; Vaze et al., 2022): Similar to MSP, but instead of using normalized softmax probabilities, this uses the maximum of the output logits to perform OOD detection.
ODIN (Liang et al., 2017a): This method uses temperature scaling and adding small noise perturbations bations to the inputs to increase the separation of softmax probability between ID and OOD examples.
Mahalanobis (Lee et al., 2018): This method takes a pretrained softmax classifier and uses the mahalanobis distance in the embedding space to separate ID examples from OOD examples.
Energy Score (Liu et al., 2020): Instead of the softmax probability, this method uses energy scores to separate ID and OOD examples.
Outlier Exposure (Hendrycks al., 2018): Leverages examples from a pscudo-OOD distribution, i.c., distribution different from the training distribution but not necessarily the OOD distribution seen test-time. Fine-tunes pre-trained network with a combined objective of (1) cross entropy loss the training examples, and (2) confidence mininization loss on the pseudo-OOD examples.
Energy Based Fine-Tuning (Liu et al., 2020): Minimizes the energy-based confidence score on pseudo- OOD examples.
WOODS (Katz-Samuels et al., 2022): Leverages a "wild" dataset naturally comprising both in- distribution (ID) and OOD samples. Rather than using confidence minimization, WOODS formulates a constrained optimization problem to maximize the OOD detection rate while constraining classification error for ID data and OOD error rate for ID examples.
We note that our experimental setup differs from that of WOODS. We closcly follow the setup established by (Hendrycks et al., 2018). First, unlike DCM, the baseline approach in Katz-Samuels et. al. (2022) does not use random augmentations on the unlabeled set to prevent overfitting. Second, at each gradient update, WOODS computes the combined objective using a 10:1 ratio of IDauncertainty set, whereas we use 1:1 sampling ratio. Third, WOODS uses mixed ID-OOD validation set for hyperparameter tuning and early stopping, while DCM and Outlier Exposure (Hendryeks et al., 2018) only use ID validation set.
23

---

Published in Transactions on Machine Learning Research (06/2024)
D.2 ID Datasets
We use the following ID datasets from common benchmarks:
CIFAR-10 (Krizhevsky et al., a): CIFAR-10 contains 50,000 train and 10,000 test images, separated into 10 disjoint classes. The images have channels and are of size 32 x 32. The classes are similar but disjoint from CIFAR-100.
CIFAR-100 (Krizhevsky et al., b): Similar to CIFAR-10 and contains 50,000 train and 10,000 test images. However, the images are now separated into 100 fine-grained and 20 coarse (super) classes. Fach super-class contains 5 fine-grained classes.
D.3 OOD Datasets
In addition to CIFAR-10 and CIFAR-100, we follow prior work (Tajwar et al., 2021; Hendrycks & Gimpel, 2016; Liu et al., 2020) and use the following benchmark OOD detection dataset:
SVHN (Netzer et al., 2011): SVHN contains images of the 10 digits in English which represent the 10 classes in the dataset. The datasct contains 73,257 train and 26,032 test images. The original datasct also contains extra training images that we do not use for our experiments. Each image in the dataset has 3 channels and has shape 32 x 32.
Tiny ImageNet (resized) (Le & Yang, 2015; Deng al., 2009; Liang et al., 2017a): TinylmageNet contains 10,000 test images divided into 200 classes and subset of the larger ImageNet. (Deng al., 2009) dataset. The original dataset contains images of shape 64 64 and Liang et al. (2017a) further creates dataset by randomly cropping and resizing the images to shape 32 x 32. We use the resized dataset here for our experiments.
LSUN (resized) (Yu et al., 2015; Liang et al., 2017a): The Large-scale Scene UNderstanding dataset (LSUN) contains 10,000 test images divided into 10 classes. Similar the TinyImageNet dataset above, Liang et al. (2017a) creates a dataset by randomly cropping and resizing the images to shape 32 32. We use the resized dataset here for our experiments.
iSUN (Xu et al., 2015; Liang et al., 2017a): iSUN contains 6,000 training, 926 validation and 2,000 test images. We use the same dataset used by Liang et al. (2017a).
Instructions on how to download the TinyImageNet, LSUN and iSUN datasets can be found here: https: //gi //github.co //github.co//hhtti www.m//sylaaang//////ooaaaaaaaee wwwooddttonneee
D.4 Training Details
Architecture: For all experiments in this section, we use a WideReesNet-40-2 (Zagoruyko & Komodakis, 2016) network.
Kyper-parameters Outlier exposure and energy based fine-tuning uses 80 Million Tiny Images (Torralba et al., 2008) as the pseudo-OOD dataset. This dataset has been withdrawn because it contains derogatory terms as categories. Thus, for fair comparison, we use the pre-trained weights provided by these papers' authors for experiments. For MSP, ODIN, Mahalanobis and energy score, we train networks for 110 epochs with initial learning rate of 0.1, weight decay of 5 x 10-4, dropout 0.3 and batch size 128. ODIN and Mahalanobis require a small OOD validation set to tune hyper-parametors. Instead, we tune the hyper-parameters over the entire lest set and report the best numbers, since we only want an upper bound on the performance of these methods. For ODIN, we try T E {1, 10, 100, 1000} and c E (0.0, 0.0005, 0.001, 0.0014, 0.002, 0.0024, 0.005, 0.01, 0.05, 0.1, 0.2] as our hyper-parameter scarch grid, and for Mahalanobis, we use the same pppremparreeter grid for For the WOODS bascline, we use all default hyperparameters, except that setting uses unlabeled auxiliary set with OOD proportion
24

---

Published in Transactions on Machine Learning Research (06/2024)
ID Datasel/
Method
SVIIN
ThylmageNet
LSUN
ISUN
Network
AUROC (1)
FPR2995 (U)
AUROC (1)
FPR (4)
AUROC
FPR (U)
AUROC
FPR (L)
MSP
87.2 (5.6)
43.4 (23.3)
90.3 (1.4)
32.8 (6.0)
93.3 (0.9)
21.3 (2.6)
92.0 (1.3)
25.9 (4.1)
MasLogit
88.5 (2.4)
12.1 (9.4)
98.2 (1.2)
27.3 (1.9
96.6 (0.8)
14.1 (2.7)
95.5 (0.8)
18.4 (2.7)
ODIN
50.3 (2.1)
41.1 (8.1)
93.8 (0:7)
27.6 (6.5)
97.5 (0.9)
10.9 (3.6)
96.6 (0.7)
16.8 (2.7)
Mahalanobii
97.3 (0.7)
14.7 (4.4)
91.2 (1.3)
38.9 (4.6)
92.1 (0.6)
28.6 (0.8)
93.7 (1.4)
26.8 (5.4)
CIFAR-10
Enengy Seore
82.8 (10.5)
19.7 (22.7)
92.0 (2.8)
34.0 (10.9)
96.2 (1:2)
16.0 (5.0)
94.9 (1.9)
23.2 (8.6)
WRN-40-2
VOS
90.8 (1.1)
28.1 (7.3)
93.4 (0.7)
27.3 (2.7)
97.0 (0.3)
12.8 (1.6)
96.0 (0.6)
16.4 (2.3)
WOODS
99.5 (0.0)
3.3 (0.3)
99.2
5.3 (0.9)
99.3 (0.1)
5.0 (0.5)
99.5
2.9 (0.4)
Outlier Expooaree
98.5
4.8
97.4
13.0
90.1
3.7
90.1
5.0
Energy Fine-Tuun Fine-Twiing
26
DCMM-Soluux (ours)
99.7 (0.1)
0.4 (0.3)
99.3 (0.3)
2.6 (1.6)
99.8 (0.1)
0.5 (0.4)
99.7 (0.1)
0.6 (0.2)
DCM-MaxdLoypt (oum)
99.8 (0.1)
0.3 (0:1)
(0.2)
1.9 (0.6)
(0.1)
(0.1)
(0.1)
0.5 (0.22
BoM--Errryy (ours)
99.8 (0.1)
0.1 (0.1)
99.4 (0:2)
1.0 (0.8)
99.9 (0.1)
0.1 (0.1)
99.8 (0.1)
0.1 (0.1)
Binory Classifier
98.9 (0.2)
1.3 (1.0)
98.7 (0.6)
(3.8)
99.0 (0.3)
(0.6)
98.8 (0.9)
16 (2.5)
RRD
90.3 (0.2)
1.7 (1.2)
99.3 (0.1)
1.7 (0.6)
99.7 (0.1)
0.2 (0.2)
99.7 (0.2)
0.5 (0.4)
ResNos-18
CIFAR-10
DCM-Soluumx (ours)
99.5 (0.2)
1.0 (0.6)
99.3 (0.1)
4.1 (1.3)
99.7 (0.1)
0.9 (0.3)
99.5 (0.1)
1.7 (0:4)
DCM MaxLogit (ouzs)
99.5 (0.1)
0.9 (0.3)
99.3 (0.1)
2.7 (0.6)
99.8 (0.1)
0.8 (0.4)
99.4 (0.1)
1.5 (0.6)
DCM-Energy (ours)
99.5 (0.2)
0.6 (0.5)
99.3 (0.1)
3.2 (1.0)
99.8 (0.1)
0.4 (0.1)
99.5 (0.1)
1.2 (0.3)
MSP
77.7 (1.4)
08.0 (4.9)
68.0 (3:2)
77.0 (b.7)
68.5 (1.6)
75.6 (3.77
67.1 (2:4)
77.6 (3.7)
MasLogit
81.3 (2.5)
13.2 (7:4)
71.7 (5.5)
72.7 (11.3)
75.9 (1.8)
67.3 (10.1)
75.4 (1.5)
70.9 (10.0)
ODIN
90.9 (2.0)
30.7 (3.7)
82.2 (4.9)
(11.7)
62.9 (5.0)
(11.3)
52.0 (2.6)
(8.1)
Mahalanobis
92.7 (1.2)
32.3 (6.0)
91.8 (2.0)
39.0 (1.2)
92.2 (2.3)
34.3 (10.0)
89.6 (3.8)
43.5 (10:2)
R-00
Energy Soore
81.7 (2.4)
61.3 (6.8)
73.1 (4.3)
73.5 (10.5)
75.2 (4.9)
70.0 (8.7)
73.8 (3.8)
72.0 (8:2)
WHN-10-2
VOS
85.1 (1:3)
41.0 (1.9)
78.2 (2.7)
61.3 (4.9)
80.1 (2.2)
56.7 (7.0)
79.1 (2.9)
58.2 (7.3)
WOODS
98.6 (U.D)
8.6 (0.3)
97.5 (0.0)
18.3 (0.3)
98.4 (0.2)
8.7 (1:3)
97 (0.3)
16.0 (2.1)
Outlier Expoeure
88.2
10.1
75.7
71.6
81.
39.1
79.2
06.1
Energy Fine Tuning
96.8
12.6
70.9
85.2
80.9
65.6
77.1
75.1
DCM-Softmax (ours)
99.6 (0.1)
0.6 (0.7)
98.7 (0:3)
5.9 (2.9)
90.5 (0.2)
1.1 (1.0)
99:1
2.7 (1.9)
DCM-Maell (rurs)
99.6 (0.2)
0.8 (1.0)
99.0 (0.2)
3.6 (2.9)
99.8 (0.1)
0.1 (0.1)
99.2 (0.3)
2.2 (2.6)
DCM-Energy (ours)
99.7 (0.1)
(0.3)
(0.3)
(2.5)
(0.1)
0.5 (0.6)
(0.2)
(0.6)
Binary Classifier
95.1 (6.8)
25.8 (40.8)
99.0 (0.7)
0.7 (0.6)
99.2 (0.4)
0.0 (0.1)
98.3 (0.5)
4.0 (5.3)
CIPAR-100
ERD
99.0 (0.1)
2.3 (0.9)
98.8 (0.3)
5.4 (1.9)
99.5 (0.1)
0.8 (0.4)
99.2 (0.1)
(0.9)
ResNet-18
DCM-Sofltux (ours)
99.3 (0.1)
2.5 (1.4)
98.7 (0.3)
7.8 (2.6)
99.4 (0.2)
1.6 (1.5)
98.8 (0:4)
6.3 (3.3)
MiM-MieeToogit (ours)
99.2 (0.1)
3.7 (0:6)
98.8 (0.2)
6.4 (1.8)
99.6 (0.1)
0.7 (0:3)
(0.2)
(1.7)
DCM-Energg (ours)
99.5 (0.1)
1.0 (0.6)
99.0 (0.3)
4.9 (2.3)
99.6 (0.2)
0.8 (0.7)
99.2 (0.3)
2.4 (0.9)
Table 7: OOD detection performance of models trained on CIFAR-10 or CIFAR-100 and evaluated on four different OOD datascts. We average metrics across 5 random seeds and show standard error in parentheses. Pre-trained weights provided by the respective authors are used to reproduce outlier exposure and energy fine-tuning results, and hence those results do not have associated standard errors. This is done due to these methods using 80-million tiny images as their auxiliary dataset, which has since been withdrawn and hence these methods' performance cannot be reproduced for other random scods.
т 0.2. We train with a learning rate of 0.001 and batch size of 128 for 100 epochs. We use an in- distribution penalty of 1.0, out-of-distribution penalty of 1.0, classification penalty of 1.0, false alarm cutoff of 0.05, learning rate for updating lambda of 1.0, tolerance for the loss constraint of 2.0, multiplicative factor of 1.5 for the penalty method, and constraint tolerance of 0.0. For our method, we pre-train our network for 100 epochs with the same setup, and fine-tune the network with our modified loss objective for 10 epochs using the same setting, except we use a initial learning rate of 0.001, batch size 32 for ID train set and 64 for the uncertainty dataset. During fine-tuning, we use 27,000 images per epoch, 9,000 of which are labeled ID train examples and the rest are from the uncertainty dataset. Finally, we use X = 0.5 for all experiments, as in Hendrycks et al. (2018), without any additional hyper-parameter tuning.
Dataset train/val split: For all methods except outlier exposure and energy based fine-tuning, we use 40,000 out of the 50,000 train examples for training and 10,000 train examples for validation. Note that outlier exposure and energy based fine-tuning uses weights pro-trained with all 50,000 training examples, which puts our method in disadvantage.
Uncertainty and test dataset construction: For our method, we use two disjoint sets of 6,000 images as the uncertainty dataset and test set. Each set contains 5,000 ID examples and 1,000 OOD examples.
Augmentations: For all methods, we use the same standard random flip and random crop augmentations during training/ boiningg/ine-tuningg fine-tuning.
25

---

Published in Transactions on Machine Learning Research (06/2024)
Setting
Method
FPR95
FPR99
AUROC
AUPR-In
AUPR-Out
MSP
64.4 (1.4)
80.5 (0.7)
74.6 (0.7)
93.9 (0.2)
32.8 (1.7)
ODIN
69.2 (2.1)
86.6 (4.0)
75.5 (0.9)
93.7 (0.4)
34.6 (0.9)
Mahalanobis
87.7 (4.2)
96.7 (0.6)
59.1 (6.1)
87.8 (2.4)
20.4 (2.6)
ID CIFAR-II 100 OOD = CIFAR-10
Energy Score
67.2 (3.2)
86.6 (1.6)
75.7 (0.9)
93.8 (0.3)
34.4 (1.0)
Outlier Exposure
63.5
77.9
75.2
94.0
32.7
Energy Fine-Tuning
57.8
74.6
77.3
94.7
34.3
DCM-Softmax (ours)
58.0 (1.7)
79.3 (2.4)
80.8 (1.2)
95.3 (0.3)
44.3 (2.1)
DCM-Energy (ours)
60.3 (2.8)
80.4 (1.6)
81.0 (1.5)
95.3 (0.4)
47.6 (2.5)
MSP
45.7 (2.5)
(5.6)
86.8 (0.3)
96.8 (0.1)
53.4 (1.0)
ODIN
54.8 (1.6)
85.1 (3.8)
87.0 (0.4)
96.6 (0.2)
59.9 (0.9)
Mahalanobis
65.4 (2.2)
85.0 (1.1)
79.4 (1.0)
94.7 (0.3)
44.2 (2.1)
ID CIFAR-10
Energy Score
59.6 (2.6)
89.0 (1.4)
86.2 (0.4)
96.2 (0.2)
59.2 (0.5)
OOD CIFAR-100
Outlier Exposure
28.3
57.9
93.1
98.5
76.5
Energy Fine-Tuming
29.0
63.4
94.0
98.6
81.6
DCM-Softmax (ours)
57.5 (6.1)
90.0 (2.8)
87.6 (0.7)
96.5 (0.4)
63.1 (0.7)
DCM-Energy (ours)
60.4 (5.3)
90.5 (2.6)
87.0 (0.9)
96.3 (0.4)
64.3 (1.2)
Table 8: OOD detection performance with WideResNeet-4022 model on CIFAR-10 CIFAR-100 and CIFAR-100 to CIFAR-10. Bold numbers represent superior results. Numbers in parenthesis represent the standard deviation over 5 seeds. 1: lower is better, f: higher is better.
E
Semi-supervised novelty detection setting
For the sake of fair comparison, we also compare our algorithm's performance to binary classifier and ERD (Tifrea et al., 2022). These methods leverage an uncertainty dataset that contains both ID and OOD examples drawn from the distribution that we will see during test-time.
ERD: Generates an ensemble by fine-tuning an ID pre-trained network on a combined ID + uncertainty dataset (which is a mixture of ID and OOD examples and given one label for all examples). Uses an ID validation set to early stop, and then uses the disagreement score between the networks on the ensemble to separate ID and OOD examples.
Binary Classifter: The approach learns discriminate between labeled ID set and uncertainty ID-OOD mixture set, with regularizations prevent the entire uncertainty dataset to be classified OOD.
We use the same datasets as Appendix D.
E.1
Architecture and training details
Architecture: For all experiments in this section, we use ResNet-18 (He et al., 2015) network, same Tifrea et al. (2022).
Hyper-parameters: For ERD and binary classifier, we use the hyper- parameters and learning rate schodule used by Tifrea al. (2022). For ERD, we standardize the experiments by using ensemble size =3 for all experiments. The ensemble models are initialized with weights pre-trained solely on the ID training set for 100 epochs, and then each is further trained for 10 epochs. For binary classifier, train all the networks from scratch for 100 epochs with learning rate schedule described by Tifrea et al. (2022). For our method, we use the same hyper- exper-paramcters as Appendix D.
We the same dataset splits, augmentations, uncertainty and test datasets Appendix D.
26

---

Published in Transactions on Machine Learning Research (06/2024)
LSUN (Crop)
Pesture
Places305
Network
AUROCT (1)
FPR/RG (L)
AUROC (1)
FPRe05 (1)
AUROC (1)
FPRAIS (1)
AUROC (1)
FIRRPOS (1)
AUROC (7)
FPRM05 (1)
VOS
96.37
15.29
N3.82
27.64
94.87
31142
10,65
82.68
91.78
37.95
CTPAR-10
BesNet-28 28
NPOS
DCM Softmaac
99.7 (0.1)
97.64
5.61
(0.5)
08.6 (0.8)
97 .2
6.6 (3.0)
4.08
99.7 (0.1)
94.92
0.6 (0.2)
14.13
95.1
94,67
14.8 (0.3)
8,39
02.4 (0.3)
91.35
52.6 (2.1)
15.37
DCM-MasIagr
98.8
(0:1)
(0.7)
(0.1)
(0:2)
02.5 (0.3)
51.4
DCM Energy
99.9 (0.1)
0.1 (0.1)
98.8 (0.7)
5.3 (3.6)
99.8 (0.1)
0.1 (0.1)
97.1 (0.2)
18.1 (1.3)
92.5 (0:3)
30.6 (2.2)
VOS
73.11
78.50
85.72
59006
82.66
72.45
80.05
75.35
75.
$1.55
NPOS
97.84
11:14
82.43
16.27
$5.48
51.72
92.44
35.20
71.30
79.08
Decsuss
S7.01
24.25
99.73
46.300
79.94
70,85
RowNet-31
(0.22)
(0.9)
(0.3)
(1.9)
90.3 (0.2)
23 (1.4)
(0.55
(2.7)
T8.6 (0:4)
07.7 (2:3)
DCM MaxLogss
99.3 (0.2)
2.0 (1.1)
08.7 (0.2)
7.3 (1.9)
99.3 (0.2)
2.3 (1.4]
88.8 (0.5)
48.9 (3.0)
78.6 (0:4)
63.8 (1.8)
LX Earrgg
99.2 (0.22)
2.2 (1.2)
98.9 (0.22
5.2 (2.0)
59.4 (0.23
1,9 (0.83
80.3 (0.55
48.5 (3.3)
78.3 (0.6)
08.9 (1.9)
Table 9: Comparison to methods that use synthetic outliers to make the model better at OOD detection. The table reports results for CIFAR-10 and CIFAR-100 as ID datasets. The results for CIFAR-10 are copied directly from Tao et al. (2023), and those for CIFAR-100 are copied directly from Du al. (2023).
F Near-OOD Detection Setting
F.1 Architecture and training details
Datascts: Similar to Tifrea et al. (2022), we try two scttings: (1) ID = first 5 classcs of CIFAR-10, OOD = last classes of CIFAR-100, (2) ID = first 50 classes of CIFAR-100, OOD = last 50 classes of C000
Dataset splits: We use 20,000 train and 5,000 validation label-balanced images during training.
Uncertainty and test split construction: We use two disjoint datasets of size 3,000 as uncertainty and test datasets. Each dataset contains 2,500 ID and 500 OOD examples.
We use the same architecture, super-parameters and augmentations, as Appendix E.
G Transductive OOD Detection Setting
In scenarios where examples similar to those encountered at test time are not available, we can use modified version of DCM in which we use uncertainty dataset consisting of the test set itself. We expect this transductive variant to perform slightly worse since end up directly minimizing confidence on ID test examples, in addition to the general absence of information from additional unlabeled data. We assess the performance of DCM in this transductive setting. In Table 5 and Table 6, we compare the performance of DCM in this transductive setting to the regular setting. While we observe a slight drop compared to the default DCM, we still show competitive performance in the transductive setting compared prior approaches, as shown in Table
H Comparison to Methods that Use Synthetic Outliers
Since DCM uses a mixture of known and unknown samples to finetune the model to be more conservative during test-time, it is reasonable to compare DCM with OOD detection methods that generate synthetic outliers and use them to make the model conservative. In this section, we compare against SOTA methods of this type: VOS (Du et al., 2022a), NPOS (Tao et al., 2023) and Dream-OOD (Du et al., 2023). We report results for CIFAR-10 and CIF as ID datasets. We use SVHN (Netzer el al., 2011), LSUN (Yu et al., 2015; Liang et al., 2017a), iSUN (Xu et al., 2015; Liang et al., 2017a), Texture (Cimpoi et al., 2013) and Places365 (Zhou al., 2017) as OOD datascts, following carlier work. Results in Table show that DCM outperforms these points of comparison in most cases. This suggests that directly using outlier inputs similar to those seen during test. time, instead of synthesizing such outlier examples, is effective approach.
27

---

Published in Transactions on Machine Learning Research (06/2024)
Methods
iNaturalist
SUN
Places
Texture
FPR (4)
AUROC (1)
FPR (4)
AUROC (1)
FPR495 (4)
AUROC (t)
FPR (4)
AUROC (t)
MCM (acro-shot)
32.08
94-11
39.21
92.28
44.88
89.83
58.05
85.96
(Fine-tuned)
Fort al,/MSP
54.05
87.43
73.37
78.03
72.96
78.03
68.85
79.06
ODIN
30.22
94.65
54.04
87.17
55.06
85.54
51.67
87.85
Energy
29.75
94.68
53.18
87.33
56.40
85.60
51.35
88.00
GradNorm
81.50
72.56
82.00
72.86
80.41
73.70
79.36
70.26
VIM
32.19
93.16
54.01
87.19
60.67
83.75
53.94
87.18
KNN
29.17
94.52
35.62
92.67
39.61
91.02
64.35
85.67
VOS
31.65
94.53
43.03
91.92
41.62
90.23
56.67
86.74
VOS+
28.99
94.62
36.88
92.57
38.39
91.23
61.02
86 86.33
NPOS
16.58
96.19
43.77
90.44
45.27
89.44
46.12
88 88.80
DCM Softmax
2.6 (0.5)
99.2 (0.1)
32.9 (1.5)
94.2 (0.2)
35.9 (1.8)
93.8 (0.3)
(1.0)
97.9 (0.1)
DCM-MaxLogii
(0.4)
99.4 (0.1)
27.5 (1.4)
91.9 (0.2)
32.5 (2.8)
94.5 (0.3)
8,2 (0.8)
98.3 (0.1)
DCM-Energy
(0.2)
99.6 (0.1)
24.5 (1.7)
95.8 (0.2)
30.8 (3.0)
95.4 (0.3)
(0.6)
98.8 (0.1)
Table 10: OOD detection performance for ImageNet-1K as ID datasct, using a ViT-B/16 model. The performance metrics baselines are copied directly from Tao et al. (2023). We report the mean and standard error over seeds for DCM.
OOD Detection Evaluation on ImageNet-1K (Deng et al., 2009)
In order to show that DCM scales to large scale datasets beyond CIFAR-10 and CIFAR-100, we also report results on ImageNet-1K.
1.1 O0D datasets
We use iNaturalist (Horn et al., 2018), SUN (Xiao et al., 2010), Texture (Cimpoi al., 2013) and Places (Zhou et al., 2017) as OOD datasets following earlier work such as (Tao el al., 2023). Particularly, use the subsets of these datasets chosen by (Tao et al., 2023) for fair comparison.
1.2 Baselines
We compare DCM with the following baselines:
Maximum concept matching (MCM) (Ming al., 2022)
Maximum softmax probability (Hendrycks & Gimpel, 2016; Fort et al., 2021)
ODIN score (Liang et al., 2017a)
Energy score (Liu et al., 2020)
Grad norm (Huang al., 2021)
ViM (Wang et al., 2022)
KNN distance (Sun et al., 2022)
Virtual Outlier Synthesis (VOS) (Du et al., 2022a)
Non-parametric Outlier Synthesis (NPOS) (Tao et al., 2023)
1.3 Training details
For these experiments, we use VIT-B/16 model (Dosovitskiy al., 2021) pretrained on ImageNet- For each OOD dataset, we run DCM using an uncertainty dataset of size 25000, with 20000 class balanced examples from ImageNet validation set (ID) and 5000 examples from the OOD dataset. We test dataset.
28

---

Published in Transactions on Machine Learning Research (06/2024)
MSP (Weight Decay)
DCM-Softmax
OOD Datasct
0.0005
0.0006
0.0008
0.001
0.005
0.01
SVHN
77.7
81.9
78.3
76.5
60.2
53.4
99.7
LSUN
68.5
69.5
71.0
73.5
66.4
68.2
99.5
TineemngeNNet
68.0
66.5
69.8
72.4
61.2
61.4
98.7
iSUN
67.1
68.5
68.4
71.5
61.5
63.5
99.1
Table 11: OOD detection AUROC of MSP (ID: CIFAR-100) when the classifier (WideReesNet-40-2) has been pro-trained with different weight decays. We see that controlling for weight decay can improve OOD detection performance slightly. Best performance of MSP for each OOD data is marked with an underline.
of size 25000, with the same composition as the uncertainty dataset but containing different images than that of the uncertainty dataset. Additionally, we use the remaining 10000 class balanced images from the validation set, not used the uncertainty dataset or the test dataset, as our validation set. For DCM, we fine-tune the pre-trained model for an additional 5 epochs, with AdamW optimizer, learning rate 3 x 10-5 weight. decay 0.01 and cosine annealing learning rate decay. Similar to experiments on CIFAR-10 and CIFAR-100, we use confidence weight À 0.3. In each batch, the model sees 32 ID training image and 64 uncertainty dataset image, and the epoch ends when we exhaust the entire uncertainty dalaset.
1.4 Results
Table 10 shows the performance of DCM compared to the baselines. We see that DCM outperform all other methods, and achieving state-of-the-art results on all OOD datasets, showing that DCM also scale to large-scalc datasets.
J DCM for OOD Detection Preserves ID Performance
DCM does slightly degrade ID performance, as seen in Tables to 4, but this degradation is small compared to the gains achieved in OOD detection. One can also use DCM to separate OOD examples, and then use the pre-trained ERM weights for the ID classification task to get the best of both worlds. DCM preserves ID performance on ImageNet-IK as well, showing that this property scales to much larger datasets.
K Exploring DCM in the OOD Detection Setting
Effect of number of epochs in the second fine-tuning stage Since the second fine-tuning stage the crucial step for algorithm, try different number of epochs for this stage and see its effect. Figure 5 shows the results. We see that the performance variation due to varying the number of epochs is negligible, implying DCM is robust to the choice of this hyper-parameters. We also see that in the 4/5 cases we have tried out, our default choice of 10 for the number of fine-tuning epochs do not achieve the best performance, justifying our experiment design.
DCM compared to other forms of regularization. For the sake of completeness, we compare DCM with weight decay and label smoothing (Szegedy et al., 2015), two popular regularization method. In these experiments, train WideRes.Vet-40-2 model on CIFAR-100 by varying each regularization factor during training the model from scratch while keeping every other hyper-paramcter and training details fixed at those described in Appendix D.4. Tables 11 and 12 show the results of these experiments.
We observe that controlling weight decay can result in a better OOD detection performance compared to the default weight docay of 0.0005 we used in this paper. However, this is not true for label smoothing, since using label smoothing 0.0 achieves the best OOD detection performance all experiments. Overall, DCM performs much better, showing it is effective form of regularization against out-of-distribution samples.
29

---

Published in Transactions on Machine Learning Research (06/2024)
MSP (Tabel smoothing)
DCM-Softmax
OOD Dataset
0
0.25
0.5
0.75
SVHN
77.7
74.9
67.2
76.4
50.0
99.7
LSUN
68.5
56.8
61.7
63.3
50.0
99.5
TingemaeeNet iSUN
68.0
59.4
62.4
58.5
50.0
98.7
67.1
55.1
61.0
59.2
50.0
99.1
Table 12: OOD detection AUROC of MSP (ID: CIFAR-100) when the classifier (WidellesVeet440222 has been pre-trained with label smoothing. Increasing label smoothing hurts OOD detection performance, as the model trained with label smoothing 0 does the best on all 4 OOD datasets, Best performance of MSP for each OOD data is marked with an underline.
ID Datasct
OOD Dataset
Classification Accuracy
OOD Detection AUROC
OOD Detection FPR@95
Fine-tune
Pre-train
Fine-tune
Pre-train
Fine-tune
Pre-train
CIFAR-10
SVHN
90.6
93.7
99.7
99.7
0.8
0.4
TinyImageNeet
90.4
93.5
99.3
99.3
2.2
2.6
LSUN
90.6
93.7
99.2
99.8
2.5
0.5
iSUN
90.2
93.5
99.5
99.7
1.4
0.6
CIFAR-100
SVHN
69.3
71.4
99.6
99.6
0.4
0.6
TinyImageNet
68.1
71.1
99.0
98.7
3.2
5.9
LSUN
69.0
71.0
99.7
99.5
0.7
1.1
iSUN
68.1
71.2
99.4
99.1
2.0
2.7
Table 13: Comparison between DCM used during pro-training a model from scratch and fine-tuning a pre-trained model. In both cases, the maximum softmax probability for OOD detection, and use WideResNet-40 model.
DCM used during pre-training. We have so far used DCM as a fine-tuning mechanism top of a pre-trained model. Here we explore DCM as pre-training algorithm. Specifically, we skip pre-training on the ID datasct from Algorithm 2, and directly train a model from scratch using objective (3), i.c., the weighted sum of cross-entropy loss on the training set and the confidence loss on the unlabeled set. We use -edeRessNet-40-2 models and train for 100 epochs. Since the uncertainty dataset is much smaller than the ID training set, we repeat the images from the uncertainty dataset so that the model sees the entire training set during each epoch. The dataset composition and other hyper-parameters are same as Appendix D.
Table 13 shows the results of these experiments. Training directly from scratch using DCM leads to slightly lower ID accuracy but comparable performance on OOD detection tasks. The loss in ID performance is due to the optimization task of DCM being harder: it has two components, namely the cross-entropy loss on the ID training set and confidence minimization loss on ID examples of the uncertainty dataset, that work in opposite dircctions, making learning the ID classification task harder. Whereas if we finc-tune an ID pre-trained model, the model already has learned the ID task and the fine-tuning step only further modifies the decision boundary, maintaining higher ID performance.
We use DCM to fine-tune pretrained model due to computational reasons: the finc-tuning step is much shorter than the pre-training step, and the ratio of compute required becomes smaller when we use larger and larger datasets. When we pre-train one epoch using DCM, the model essentially sees 2x the number images compared to regular pre-training and hence takes 2x compute, since soes equal number of images from the training and auxiliary datasets. Also this lets take one ID pre-trained model and adapt relatively quickly to different test distributions, avoiding the costly pre-training process for each different test distribution.
30

---

Published in Transactions on Machine Learning Research (06/2024)
L Selective Classification Experiment Details
L.1
Baselines
MSP (Hendrycks & Gimpel, 2016): Also referred to Softmax Response (SR), MSP directly uses the maximum softmax probability assigned by the model as an estimate of confidence. MSP has been shown to distinguish in-distribution test examples that the model gets correct from the ones that it gets incorrect.
MaxLogit (Hendrycks et al., 2022): Directly uses the maximum logit outputted by the model as an estimate of confidence.
Ensemble (Lakshminarayanan et al., 2017): Uses an ensemble of models, each trained with ERM on the ID train distribution with different random seeds. Following Lakshminarayanan et al. (2017), we use the entropy of the average softmax predictions of the models in the ensemble as the disagreement metric.
Binary Classifier (Kamath et al., 2020): Trains classifier the labeled training and validation sets to predict inputs for which the base model will be correct versus incorrect. The classifier takes as input the softmax probabilities outputted by the base model. For the Binary Classifier, we found the MLP with softmax probabilities to work best compared to a random forest classifier and MLP with last-layer features.
Fine-tuning First trains a model on the training set, then fine-tunes the model on the validation set.
Deep Gamblers (Liu et al., 2019): Trains a classifier using a loss function derived from the doubling rate in a hypothetical horse race. Deep Gamblers introduces an extra (c+ 1)-th class that represents abstention. Minimizing this loss corresponds to maximizing the return, where the model makes bet prediction when confident, and abstains when uncertain.
Self- Adaptivee Training (Huang et al., 2020): Trains a classifier using model predictions to dynamically calibrate the training process. SAT introduces an extra (c + 1)-th class that represents abstention and uses training targets that are exponential moving averages of model predictions and ground-truth targets.
L.2 Datasets
CIFAR-10 (Krizhevsky et al., a) CIFAR-10-C (Hendrycks & Dietterich, 2019): The task is to classify images into 10 classes, where the target distribution contains severely corrupted images. We run experiments over 15 corruptions (brightness, contrast, defocus blur, clastic transform, fog, frost, gaussian noise, glass blur, impulse noise, jpeg compression, motion blur, pixelate, shot noise, snow, zoom blur) and use the data loading code from Croce et al. (2020).
Waterbirds (Wah et al., 2011; Sagawa et al., 2019): The Waterbirds datasct consists of images of landbirds and waterbirds land or water backgrounds from the Places dataset (Zhou et. al., 2017). The train set consists of 4,795 images, of which 3,498 are of waterbirds water backgrounds, and 1,057 are of landbirds on land backgrounds. There are 184 images of waterbirds on land and 56 images of landbirds on water, which are the minority groups.
Camelyon17 (Koh et al., 2021; Bandi et al., 2018): The Camelyon17 dataset is a medical image classification task from the WILDS benchmark (Koh et al., 2021). The dataset consists of 450, 000 whole- slide images of breast cancer metastases in lymph node from hospitals. The input is 96 x 96 image, and the label y indicates whether there is a tumor in the image. The train set consists of lymph-node scans from 3 of the 5 hospitals, while the OOD validation set and OOD test datascts consists of lymph-node scans from the fourth and fifth hospitals, respectively.
FMoW (Koh et al., 2021): The FMoW datasct is satellite image classification task from the WILDS benchmark (Koh et al., 2021). The dataset consists of satellite images in various geographic locations from 2002 2018. The input is a 224 x 224 RGB satellite image, and the label y is one of 62 building or land use categorics. The train, validation, and test splits are basod on the year that the images were taken: the train, ID validation, and ID test sets consist of images from 2002-2013 the OOD validation set consists of images from 2013 2016, and the OOD test set consists of images from 2016 2018.
31

---

Published in Transactions on Machine Learning Research (06/2024)
L.3 CIFAR-10 - CIFAR-10-C training details
Architecture: We use WideResNeet28-L1 trained the source CIFAR-10 distribution and attains 94.78% clean accuracy (Croce et al., 2020). The base models for Deep Gamblers and Self-Adaptive Training use the same architecture with an additional 11th class in the final linear layer.
Hyper-parameters: DCM, Fine-tuning, Binary Classifier, Deep Gamblers, and Self- Adlative Training fine-tune the base models for 10 epochs. We perform hyperparameter tuning on a separate, held-out TD validation set. We tune all baselines over the learning rates {1e-3, 1e-4, 1e-5), and use an initial learning rate of 1e-3 for all baselines except DCM, which uses an initial learning rate of 1c-4. For DCM, we use a confidence weight. of À = 0.5 for all corruptions, as in Hendrycks al. (2018). For Deep Gamblers, we use reward of 3.2 and tune over rewards in the range [2.0, 4.2) with step size of 0.2, as in Liu et al. (2019). We use SGD with a cosine learning rate schedule, weight decay of 5 10-4, and batch sizes of 128 and 256 for the fine-tuning set and uncertainty datasets, respectively.
Validation and test set construction: We use the CIFAR-10 test set, and split it into a validation set of 5000 images, a test set of 4000 images, and set aside 1000 images for hyperparameter tuning. Similarly, for CIFAR-10-C, we use a validation set of 5000 images, and a test set of 4000 images.
Each of our settings merges the train/val wal/test, splits from the corresponding datasets. For example, Val = CIFAR-10, Test = CIFAR-10 10 + CIFAR-10-C uses a validation set of 5000 CIFAR-10 images for fine-tuning and a test set of 4000 CIFAR-10 and 4000 CIFAR-10-C images. Note that our combined CIFAR-10 + CIFAR-10-C Lest sets have a 1:1 clean-to-corrupted ratio.
Augmentations: For DCM and fine-tuning, we use the same standard random horizontal flip and random crop (32 32).
L.4 Waterbirds training details
Architecture: For our base model, we train a pretrained ResNet50 from torchvision on subset of the Waterbirds train set (details of the split are described below). We follow the training details for the ERM bascline used by Sagawa al. (2019), and use SGD with momentum term of 0.9, batch normalization, and no dropout. We use fixed learning rate of 0.001, l penalty of X = 0.0001 and train for 300 epochs.
Hyper-parameters: DCM, Fine-tuning, Binary Classifier, Deep Gamblers, and Self-Adaptive Training fine-tune the base models for 20 epochs. We perform hyperparameter tuning on a separate, held-out ID validation set. We tune all baselines over the learning rales (le-3, le-4, le-5), and use an initial learning rate of 1e-3 for all baselines except DCM, which uses an initial learning rate 1e-4. For DCM, we use a confidence weight of X = 0.5. For Deep Gamblers, we use a reward of 1.4 and tune over rewards in the range [1.0, 2.0] with step size of 0.2. We use SGD with cosine learning rate schedule, weight decay of 5 10 4, and batch sizes of 64 and 128 for the fine-tuning set and uncertainty datasets, respectively.
Validation and test set construction: We split the Waterbirds train set from Sagawa et al. (2019) into two sets, one which we use to pretrain base ERM model, and the other which we use as our ID) validation set. We maintain group ratios, and the ID train and validation sets each contain 2,397 images, consisting of 1749 waterbirds on water, 528 landbirds on land, 92 waterbirds on land, and 28 landbirds on water. Our test set is the same test set from Sagawa et al. (2019).
Augmentations: DCM and Fine-Tuning use the train augmentations as in Sagawa et al. (2019): a random resized crop (224 224) and random horizontal flip.
L.5 Camelyon17 training details
Architecturc: We use a DenscNet121 pre-trained on the Camelyon17 train set from Koh al. (2021) as our base model. These models are trained for 5 epochs with a learning rate of 0.001, & regularization strength of 0.01, batch size of 32, and SGD with momentum set to 0.9.
32

---

Published in Transactions on Machine Learning Research (06/2024)
Hyper-parameters: DCM, Fino-tuning, Binary Classifier, Deep Gamblers, and Self-Adaptive Training fine-tune the base models for epoch. We perform hyperparameter tuning validation set. We tune all baselines over the learning rates {1e-3, le-4, 1e-5), and use an initial learning rate of Ic-4 for all basclines. For DCM, we use a confidence weight of À = 0.5. For Deep Gamblers, we use a reward of 1.4 and Lune over rewards the range [1.0, 2.0] with step size of 0.2. We use an AdamW optimizer with a cosine learning rate schedule, weight decay of 5 x 10-4, and batch size of 32 for the line-tuming set and uncertainty datasets.
separate, held-out TD
Validation and test set construction: We use the train / ID val / OOD val / OOD test splits from the WILDS benchmark construct our validation and test sets. For our ID validation set and ID test set, we split the Camelyon17 ID validation set into two equally-sized subsets and maintain group ratios. The Camelyon17 ID validation consists of samples from the same 3 hospitals the train set. We use the OOD test set as our target distribution, which contains samples from the 5th hospital.
Augmentations: DCM and Fine-tuning use random horizontal flips.
L.6 FMoW training details
We use FMoW ERM models from the WILDS benchmark (Koh et al., 2021) base model. These models use DenscNet121 pretrained on ImageNet with no &g regularization, Adam optimizer with an initial learning rate of 1e-4 that decays by 0.96 per epoch, and train for 50 epochs with early stopping and batch size of 64.
Architecture:
:yper-parameters: DCM, Fine-tuning, Binary Classifier, Deep Gamblers, and Self- Belf-Adaptive Training fine-tune the base models for 5 epochs. We perform hyperparameter tuning on a separate, held-out ID validation set. We tune all baselines over the learning rates {le-3, 1e-4, le-5, 1e-6}, and use an initial learning rate of 1e-3 for SAT, le-4 for Fine- finig, Deep Gamblers, and Binary Classifier, and 1e-5 for DCM. For DCM, we use a confidence weight of X = 0.1 and tune over the weights {0.01, 0.05, 0.1, 0.5, 1.0, 1.5) on held-out ID validation set. For Deep Gamblers, range [5.0, 65.0] with step size of 5.0. We use an AdamW optimizer with a cosine learning rate schedule, weight decay of 5 x 10-4, and batch sizes of 16 and 32 for the uncertainty dataset and fine-tuning sets, respectively.
reward of 35 and tune over rewards in the
Validation and test. set construction: We use the train, ID validation, OOD validation, and OOD test splits from the WILDS benchmark as our validation and test sets. Specifically, we use the ID validation set, ID test set, and OOD test sets. For example, the task Val = FMoW ID, Test = FMoW ID + FMoW OOD uses the WILDS ID val set for validation, and the WILDS ID and OOD test sets for testing.
Augmentations: DCM and Fine-tuning use random horizontal flips.
M Selective Classification Ablations
M.1 Effect of Validation Set Size
Figure 7 shows the performance of DCM on selective classification when we vary the size of the validation set. DCM consistently outperforms baselines in distribution-shif settings with different validation set sizes.
M.2 DCM compared to other regularization methods
Table 14 shows the comparison between pre-training with label smoothing (Szegedy et al., 2015) as a form of regularization and DCM. We see that higher weights of label smoothing degrades performance, and therefore is not an alternative to DCM.
N Compute
All model training and experiments were conducted a single NVIDIA RTX Titan A40 GPU.
33

---

Published in Transactions on Machine Learning Research (06/2024)
99.6
99.4
Sel. Class. AUC
76-
Sel. Class. AUC
99.2
93
Class.
74-
98.8
72
98.6
DCM (Ours)
MSP
DCM (Ours)
MSP
92
(Ours)
Bin. Class,
DG
70
Bin. Class.
Bin. Class,
DG
Fine-Tuning
SAT
Fine-Tuning
Fine-Tuning
SAT
98.2
100
500
1000
2000
4000
100
500
1000
2000
4000
91
100
500
1000
2000
4000
Size of Validation Set
Size of Validation Set
Size of Validation Set
Figure 7: Selective classification performance of DCM when we vary the size of the validation set. Left:
CIFAR-10 - CIFAR-10, Middle: CIFAR-10 + CIFAR-10-C, Right: CIFAR-10 - CIFAR-10 + CIFAR-10-C.
DCM consistently outperforms baselines in distribution-shift settings with different validation set sizes.
MSP with Label Smoothing
DCM-SSftmax
Eval Data
0
0.25
0.5
0.75
ID
81.3
81.0
80.7
71.0
59.6
82.9
ID+OOD
77.1
76.9
76.4
67.8
52.5
78.9
OOD
74.5
74.3
74.2
64.0
55.1
76.4
Table 14: Pre-training with label smoothing does not improve selective classification. Here, we compare an MSP classifier pre-trained with varying degrees of label smoothing with DCM on the FMoW dataset. Higher weights label smoothing degrade performance. We underline the best performance of MSP with label smoothing.
34

---

Published in Transactions on Machine Learning Research (06/2024)
Method
ECE (L)
Acc (1)
AUC (1)
Acce190 (1)
AccR955 (1)
Acct199 (1)
Covs190 (1)
Covr195 (1)
Cookigg (1)
Val = CIFAR-10, 10, Test = CIFAR.10 10
MSP
0.5 (0.1)
95.2 (0.1)
99.3 (0.1)
98. (0.1)
97.2 (0.1)
95.7 (0.1)
100 (0.0)
100 (0.0)
87.0 (0.1)
MaxLogit
0.6 (0.1)
95.1 (0.1)
98.9 (0.1)
97.9 (0.1)
96.8 (0.1)
95.6 (0.1)
100 (0.0)
100 (0.0)
80.4 (0.1)
Ensemble
(0.1)
96.1 (0.1)
99.5 (0.1)
98.9 (0.1)
(0.1)
96.1 (0.1)
100 (0.0)
100 (0.0)
86.5 (0.1)
Binary Classifier
1.4 (0.1)
95.2 (0.1)
99.3 (0.1)
98.4 (0.1)
97.2 (0.2)
95.7 (0.2)
100 (0.0)
100 (0.0)
87.0 (2.3)
Vine-Tuning
0.3 (0.2)
96.2 (0.1)
99.6 (0.1)
99.1 (0.2)
98.7 (0.1)
97.5 (0.2)
100 (0.0)
100 (0.0)
91.6 (0.9)
DG
0.8 (0.1)
94.5 (0.0)
99.0 (0.0)
97.4 (0.1)
96.1 (0.0)
94.9 (0.1)
100 (0.0)
98.7 (0.1)
76.2 (1.7)
SAT
0.7 (0.1)
91.7 (0.0)
99.2 (0.0)
97.6 (0.1)
96.3 (0.0)
91.9 (0.1)
100 (0.0)
98.8 (0.1)
81.6 (1.1)
DCM (ours)
1.0 (0.2)
94.7 (0.2)
99.2 (0:2)
98.0 (0.2)
96.5 (0.2)
94.8 (0:2)
100 (0.0)
98.6 (0.4)
83.9 (1.0)
Val CIFAR-IO, Test CIFAR-I0 CIFAR-I0-C
MSP
9.3 (0.1)
75.8 (0.1)
92.6 (0.1)
S0.1 (0.1)
78.3 (0.1)
76.4 (0.1)
72.4 (0.2)
60.6 (0.2)
27.4 (0.7)
MaxLogit
9.4 (0.0)
75.7 (0.1)
91.7 (0.0)
80.4 (0.0)
18.2 (0.0)
76.3 (0.0)
70.5 (0.1)
51.0 (0.3)
10.1 (0.3)
Eusemble
(0.1)
76.4 (0.1)
93.4 (0.1)
812 (0.1)
(0.1)
76.8 (0.1)
(0.2)
60.5 (0.3)
35.0 (0.6)
Binary Classifier
7.9 (0.1)
75.4 (0.1)
92.5 (0.1)
80.3 (0.1)
78.1 (0.1)
76.2 (0.1)
72.0 (0:2)
59.9 (0.3)
30.5 (1.7)
Fine-Tuning
8.2 (0.1)
(0.1)
93.4 (0.1)
813 (0.1)
78.9 (0.1)
77.9 (0.1)
71. (0.2)
63.1 (0.3)
42.4 (0.9)
DG
8.2 (0.0)
76.0 (0.1)
93.0 (0.1)
81.0 (0.0)
78.8 (0.0)
76.9 (0.0)
73.2 (0.2)
60.7 (0.5)
33.4 (1.2)
SAT
7.8 (0.0)
76.2 (0.1)
93.3 (0.0)
81.1 (0.0)
78.7 (0.1)
76.8 (0.0)
74.1 (0.0)
62.7 (0.1)
42.7 (0.3)
DCC (ours)
8.0 (0.1)
77.0 (0.1)
93.6 (0.1)
(0.1)
79.7 (0.1)
(0.1)
75.2 (0.1)
63.8 (0.3)
43.6 (0.9)
Val CIFAR-10, Test CIEAR 10.C
MSP
13.8 (0.1)
56.4 (0.1)
70.1 (0.1)
57.4 (0.2)
56.0 (0.2)
54.8 (0.1)
30.2 (0:3)
20.9 (0.5)
7.6 (0.3)
MaxLogit
14.6 (0.0)
56.4 (0.1)
71.7 (0.1)
59.4 (0.1)
58.0 (0.0)
56.8 (0.0)
23.2 (0.7)
11.3 (0.3)
3.5 (0.5)
Enseuble
13.1 (0.1)
57.2 (0.1)
75.3 (0.1)
618 (0.1)
58.6 (0.1)
57.9 (0.1)
28.0 (0.2)
17.6 (0.5)
6.8 (0.2)
Binary Classifier
13.6 (0.1)
56.2 (0.2)
72.8 (0.2)
50.5 (0.2)
58.0 (0.2)
56.7 (0.6)
28.5 (0.6)
16.4 (0.8)
8,2 (0.8)
Fino-Thiing
12.7 (0.1)
57.6 (0.1)
75.4 (0.1)
61.7 10.2)
60.2 (0.3)
58.8 (0.3)
33.6 (0.8)
22.5 (0.8)
8.6 (0.5)
DG
12.7 (0.0)
56.8 (0.1)
74.3 (0.2)
(0.1)
59.9 (0.0)
58.7 (0.0)
28.4 (0.5)
17.2 (0.2)
7.2 (0.3)
SAT
12.5 (0.0)
37.4 (0.1)
75.3 (0.1)
614 (0.1)
59.8 (0.1)
58.1 (0.1)
32.5 (0.5)
22.0 (0.8)
8.6 (0.2)
DCM (ours)
12.3 (0.1)
59.4 (0.1)
77.5 (0.2)
64.1 (0.2)
62.4 (0.2)
61.0 (U.2)
37.6 (0.6)
25.2 (1.0)
8.9 (0.2)
Table 15: Selective classification performance on various distribution shift tasks constructed from the CIFAR-10 and CIFAR-10-C datasets. Bold numbers represent superior results, and parentheses show the standard error over 3 random seeds. DCM consistently outperforms MSP, MaxLogit, Deep Gamblers (DG), and Adaativee Training (SAT), and outperforms all 7 prior methods when the validation and test sets are from different distributions.
Method
ECE (L)
Ace (t)
AUC (t)
Acc1900 (1)
Accl19 (1)
Acci999 (1)
Covig0 (t)
Covi195 (t)
Cov (t)
Val Waterbirds Train, Test
Waterbirds- Train
MSP
3.4 (0.0)
96.8 (0.0)
98.7 (0.0)
99.1 (0.0)
98.2 (0.0)
97.1 (0.0)
100 (0.0)
100 (0.0)
90.1 (0.0)
MaxLogit
3.2 (0.0)
96.8 (0.0)
98.6 (0.0)
99.3 (0.0)
98.2 (0.0)
97.2 (0.0)
100 (0.0)
100 (0.0)
91.0 (0.0)
Ensemble
3.1 (0.0)
97.0 (0.0)
98.7 (0.0)
98.9 (0.0)
98.2 (0.0)
97.2 (0.0)
100 (0.0)
100 (0.0)
88.8 (0.0)
Binary Classifier
3.4 (0.0)
96.0 (0.0)
98.7 (0.0)
99.1 (0.0)
98.2 (0.0)
97.1 (0.0)
100 (0.0)
100 (0.0)
90.1 (0.0)
Fine- Tuning
(0.0)
96.9 (0.0)
98.7 (0.0)
99.4 (0.0)
98.6 (0.0)
97.3 (0.0)
100 (0.0)
100 (0.0)
91.8 (0.0)
DG
1.3 (0.3)
97.0 (0.0)
98.5 (0.0)
98.8 (0.1)
98.0 (0.1)
97.3 (0.0)
100 (0.0)
100 (0.0)
86,9 (0.5)
SAT
0.7 (0.44
96.8 (0.0)
98.6 (0.0)
90.1 (0.1)
98.3 (0.1)
97.4 (0.1)
100 (0.0)
100 (0.0)
91.3 (0.9)
DCM (ours)
1.8 (0.6)
96.8 (0.0)
98.7 (0.0)
99.2 (0.0)
98.3 (0.1)
97.2 (0.0)
100 (0.0)
100 (0.0)
91.9 (0.1)
Val= = Waterbirds-Traaa Test
Waterbirds-TT Test
MSP
15.1 (0.0)
84.3 (0.0)
94.4 (0.0)
88.2 (0.0)
86.8 (0.0)
85.3 (0.0)
83.9 (0.0)
60.9 (0.0)
27.5 (0.0)
MaxLogit
18.1 (0.0)
84.3 (0.0)
94.2 (0.0)
87.9 (0.0)
(0.0)
84.7 (0.0)
82.2 (0.0)
60.9 (0.0)
23.8 (0.0)
Ensemble
14.9 (0.0)
85.0 (0.0)
94.4 (0.0)
88.4 (0.0)
87.0 (0.0)
85.4 (0.0)
85.0 (0:0)
62.0 (0.0)
25.6 (0.0)
Binary Classifier
16.4 (0.3)
84.9 (0.2)
94.0 (0:2)
87.5 (0.3)
86.1 (0.2)
84.8 (0.2)
81.2 (1.8)
59.8 (2.0)
24.2 (1.1)
Fine-Tuning
15.3 (0.4)
85.9 (0.5)
91.7 (0.2)
89.0 (0.5)
87.2 (0.3)
86.2 (0.5)
86.8 (1.))
61.0 (2.7)
27.9 (2.7)
DG
17.3 (0.4)
85.1 (0.1)
94.8 (0.1)
88.6 (0.2)
$7.0 (0.2)
85.8 (0.2)
85.4 (0.6)
67.3 (1.1)
29.4 (0.4)
SAT'
17.5 (0.2)
86.0 (0.0)
95.1 (0.0)
88.9 (0.1)
87.0 (0.1)
85.6 (0.1)
87.2 (0.4)
70.0 (0.3)
34.4 (0.4)
DCM (owrs)
13.9 (0.7)
86.5 (0.2)
95.0 (0.1)
(0.3)
88.0 (0.4)
86.6 (0.4)
88.2 (0.8)
66.5 (0.3)
29.8 (1.1)
Table 16: Selective classification on the Waterbirds spurious correlation dataset. Bold numbers represent
superior results, and parentheses show the standard error over random seeds. DCM consistently outperforms all 7 prior methods when the validation and test sets are from different distributions, suggesting that DCM is effective in spurious correlatton settings.
35

---

Published in Transactions on Machine Learning Research (06/2024)
Method
ECE (L)
Acc (t)
AUC (1)
Acc (1)
Acc095 (1)
Acc099 (1)
Cov090 (1)
Cov (1)
Cov (t)
Val = Camelyon17 ID Val-1, Test
Camelyon17
ID Val-2
MSP
16.3 (10.4)
81.5 (7.8)
96.9 (2.2)
92.0 (5.9)
90.8 (6.4)
89.5 (6.6)
87.2 (10.5)
78.6 (17.5)
60.5 (25.5)
MaxLoggit
16.4 (10.2)
81.5 (7.8)
97.0 (2.2)
92.2 (5.8)
91.0 (6.4)
89.8 (6.5)
87.8 (10.0)
79.1 (17.1)
60.1 (27.0)
Ensemble
15.7 (11.2)
91.8 (6.4)
99.1 (2.7)
96.8 (6.9)
95,9 (6.7)
96.1 (6.8)
100.0 (10.5)
99.4 (18.1)
73.2 (27.7)
Binary Classifler
16.3 (9.2)
89.1 (6.5)
97.0 (1.5)
92.3 (5.9)
91.1 (6.0)
90.3 (6.7)
88.1 (10.2)
79.3 (16.8)
61.0 (21.2)
Fine- Tuning
2.8 (0.2)
98.3 (0:2)
90.8 (0.0)
99.7 (0.0)
99.4 (0.1)
98.6 (0.2)
100.0 (0.0)
100.0 (0.0)
97.3 (0.7)
DG
3.4 (2.1)
97.5 (0.4)
99.8 (0.0)
99.6 (0.1)
99.2 (0.3)
98.2 (0.4)
100.0 (0.0)
100.0 (0.0)
96.1 (1.7)
SAT
1.6 (0.0)
97.7 (0.0)
99.8 (0.0)
99.7 (0.0)
99.4 (0.0)
98.5 (0.0)
100.0 (0.0)
100.0 (0.0)
96.7 (0.3)
DCM (ours)
9.9 (0.3)
95.3 (0.2)
99.5 (0.1)
98.6 (0.2)
98.0 (0.0)
96.6 (0.2)
100.0 (0.0)
100.0 (0.0)
82.4 (5.3)
Val = 1amelyon17 77 ID Val-1, Test Camelyon
17 I1) Val-2 Camelyon17
(OD) Test
MSP
25.9 (6.4)
66.2 (5.1)
85.8 (3.7)
74.1 (5.1)
73.1 (4.9)
72.2 (4.8)
40.6 (7.8)
29-4 (8.1)
7.4 (3.3)
MaxLogit
25.9 (6.1)
66.2 (5.1)
85.8
71.2 (5.1)
73.1 (5.0)
72.2 (1.8)
10.7 (7.9)
29.1 (8.2)
7.7 (3.6)
Ensemble
19.6 (6.7)
75.6 (4.6)
86.5 (4.1)
78.1 (4.8)
76.8 (5.2)
76.8 (4.2)
25.8 (8.1)
18.7 (8.4)
11.5 (3.5)
Binary Classifier
26.3 (6.0)
72.0 (4.7)
86.2 (3.3)
74.4 (5.0)
73.4 (4.9)
72.7 (4.4)
41.0 (8.1)
29.8 (8.2)
7.5 (3.5)
Tun-TTning
20.5 (1.9)
76.7 (3.4)
88.9 (2.2)
79.8 (3.5)
78.6 (3.4)
17.6 (3.3)
11.2 (5.8)
33.1 (2.8)
9.7 (6.3)
DG
27.5 (7.3)
74.0 (5.8)
86.1 (4.1)
77.2 (6.3)
75.8 (6.3)
(6.0)
51.3 (14.3)
(9.3)
(3.8)
SAT
24.3 (2.1)
72.1 (1.1)
86.3 (0.4)
74.8 (1.1)
73.8 (1.1)
73.0 (1.2)
35.2 (1.3)
29.3 (1.6)
15.2 (1.4)
DCM (ouns)
8.9 (1.6)
80.6 (1.0)
93.5 (0.6)
85.5 (1.0)
83.8 (1.0)
82.5 (0.9)
74.1 (1.3)
50.3 (6.5)
16.4 (0.6)
Val = 1amelyon17
ID Val-1, Test Camelyon 17 OOD Test
MSP
28.2 (5.1)
63.1 (1.8)
82.2 (3.9)
70.1 (1.8)
69.5 (4.6)
68.8 (1-1)
31.5 (6.8)
21.8 (7.8)
241 (0.1)
MaxLLogit
28.2 (5.4)
63.1 (4.8)
82.1 (3:9)
70.4 (4.8)
69.5 (4.6)
68.8 (4.4)
31.4 (6.9)
21.9 (7.8)
2.4 (0.4)
Ensemble
21.1 (5.6)
71.8 (4.8)
81.4 (4.4)
74.0 (5.2)
72.8 (4.3)
72.0 (4.7)
134 (7.3)
9.8 (8.1)
4.6 (0.3)
Binary Classifier
28.0 (5.3)
69.0 (5.2)
82.1 (3.9)
70.5 (1.4)
70.1 (4.2)
69.5 (6.5)
32.1 (5.6)
22.1 (7.3)
2.5 (0.4)
Fine- Tuning
23.6 (2.0)
72.8 (1.2)
812 (3.8)
75.4 (4.2)
74.3 (4.1)
73.5 (4.0)
31.4 (6.0)
21.6 (6.5)
3.8 (3.1)
DG
31.6 (8.5)
69.4 (7.5)
84.8 (5.2)
72.1 (7:9)
70,9 (7.7)
70.1 (7.3)
43.3 (11.2)
(8.0)
5.8 (4.0)
SAT
21.7 (2.3)
70.2 (0.7)
80.3 (0.6)
71.9 (0.8)
71.3 (1.0)
70.8 (1.0)
20.3 (3.6)
5.9 (1.0
0.0 (0.0)
DCM (ours)
11.5 (2.1)
78.7 (1.2)
91.6 (1.1)
82.5 (1.2)
80.9 (1.1)
79.7 (1.1)
62.5 (8.22
40.3 (7.5)
9.7 (2.9)
FMoW ID Val, Test
FMoW
MSP
1.8 (0.4)
58.4 (1.5)
81.3 (0.4)
62.6 (0.1)
60.9 (0.1)
58.7 (0.1)
36.7 (1.3)
18.4 (5.8)
3.7 (1.8)
MaxLogit
1.8 (0.4)
58.4 [0.1)
80.1 (0.2)
62.7 (0.2)
60.6 (0.1)
58.8 (0.1)
29.7 (0.8)
10.7 (2.2)
0.8 (0.4)
Ensemble
0.8 (0.0)
62.5 (0.1)
85.5 (0.0)
68.4 (0.1)
66.1 (0.1)
64.2 (0.1)
44.8 (0.3)
31.5 (0.1)
10.6 (0.8)
Binary Classifler
1.9 (0:4)
58.1 (0.2)
82.3 (0.3)
613 (0.1)
62.0 (0.2)
60.2 (0.1)
37.6 (0.5)
20.9 (1.3)
3.7 (2.7)
Fine-Tume Tuningning
1.2 (0.5)
59.3 (2.7)
82.8 (0.9)
64.0 (1.2)
61.7 (1.3)
59.9
39.5 (2.4)
27.0 (2.8)
5.9 (1.2)
DG
1.8 (0.1)
58.5 (0.4)
75.8 (0.2)
62.4 (0.9)
60,9 (0.5)
59.9 (0.4)
12.9 (0.6)
2.6 (18)
0.1 (0.0)
SAT
1.1 (0.0)
58.3 (0.5)
81.1 (0.3)
63.0 (0.5)
60.8 (0.5)
59.1 (0.5)
33.5 (0.5)
18.8 (1.0)
4.3 (0.9)
DCM (ours)
1.1 (0.5)
59.3 (1.2)
82.9 (1.1)
61.2 (1:2)
61.7 (1.3)
59.9 (1.1)
39.4 (2.5)
26.7 (3.5)
6.3 (2.0)
FMoW Val, Test
FMoW
Test
MSP
2.3 (0.4)
51.5 (0.1)
77.1 (0.5)
57.9 (0.1)
55.9 (0.2)
54.2 (0.0)
25.4 (2.3)
11.0 (4.6)
(0.6)
MaxLogit
2.3 (0.5)
51.5 (0.1)
75.8 (0.1)
57.8 (0.1)
36.7 (0.1)
51.2 (0.0)
19.4 (0.3)
4.3 (0.9)
0.3 (0.2)
Ensemble
1.3 (0.0)
56.5 (0.0)
81.7 (0.0)
63.2 (0.0)
61.2 (0.0)
59.4 (0.0)
35.6 (0.2)
24.3 (0.1)
5.6 (0.2)
Binary Classifier
2.5 (0.4)
53.8 (0.1)
78.0 (0.4)
59.3 (0.0)
37.3 (0.0)
55.6 (0.0)
27.5 (1.5)
9.3 (6.2)
(0.9)
Fine-Tuning
1.7 (0.3)
5122 (2.3)
(0.8)
58.6 (1.2)
36.5 (1.1)
51.8 (L1)
30.8 (2.1)
19.1 (1.7)
3.0 (0.3)
DG
2.2 (0.0)
51.0 (0.3)
71.6 (0.2)
37.5 (0.3)
36.1 (0.2)
55.1 (0.2)
5.0 (0.2)
0.2 (0.1)
0.0 (0.0)
SAT
1.4 (0.0)
53.7 (0.4)
76.7 (0.2)
57.8 (0.4)
55.8 (0.4)
54.3 (0.4)
24.8 (0.3)
11.2 (0.8)
0.5 (0.2)
DCM (ours)
1.5 (0.3)
51.6 (1.7)
78.9 (1.1)
58.8 (1.3)
56.7 (1.3)
55.0 (1.3)
30.7 (2.0)
20.1 (2.2)
3.8 (1.1)
FMoW ID Val, Test
FMoW OOD Test
MSP
2.6 (0.5)
50.9 (2.7)
74.5 (0.6)
55.2 (0.2)
33.4 (0.3)
52.0 (0.1)
20.6 (3.2)
(3.5)
(0.4)
Maxiaggit
2.6 (0.5)
50.7 (0.1)
73.3 (0.2)
56.2 (0.0)
53.3 (0.1)
51.9 (0.1)
13.7 (0.4)
3.2 (0.8)
0.3 (0.1)
Ensemble
1.6 (0.0)
55.0 (0.1)
79.5 (0.0)
60.7 (0.1)
58.6 (0.1)
57.0 (0.1)
31.1 (0.1)
20.8 (0.4)
3.3 (0.6)
Binary Classifier
2.8 (0.5)
51.7 (0.0)
75.6 (0.5)
56.8 (0.1)
51.9 (0.0)
53.3 (0.0)
21.1 (3.8)
7.6 (1.8
1.0 (0.4)
Fine-Tume Tunin
2.0 (0.3)
51.8 (1.1)
76.2 (0.8)
(0.9)
53.9
52.4 (1.0)
26.8 (1.4)
14.8 (1.3)
1.7 (0.1)
DG
2.5 (0.0)
61.9 (0.1)
69.2 (0.3)
54.9 (0.2)
53.7 (0.1)
52.6 (0.0)
2.7 (0.8)
0,1 (0.1)
0.0 (0.0)
SAT
1.6 (0.0)
51.0 (0.4)
71.1 (0.2)
56.1 (0.4)
53.2 (0.3)
51.8 (0.3)
20.1 (0.4)
7.1 (1.1)
0.3 (0.1)
DCM (ours)
1.8 (0.3)
51.9 (1.7)
76.4 (1.1)
56.2 (1.4)
34.1 (1.3)
52.4 (1.2)
26.8 (1.6)
16.3 (1.7)
244 (0.5)
Table 17: Selective classification on the Camelyon17 and FMoW domain shift datasets. Bold numbers represent best performance, and parentheses show the standard error over 3 random seeds. On Camelyon17, DCM consistently outperforms all prior methods when the validation and test sets are from different distributions. On FMoW, DCM has the second-highest AUC after Ensemble, while using only 1/5 of the compute.
36


Reviews:
[{"review_id": "jArpEc2xWS", "reviewer": "Reviewer_6SyM", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "Strengths:\n-----------\n- Proposed DCM framework seems promising in that it combines the target objective along with the minimization of the confidence on uncertainty dataset, enabling lower confidence on uncertain examples.\n\n- Empirical evaluation shows that DCM outperforms existing approaches in OOD detection.\n\nWeaknesses:\n-----------\n- At the heart of the DCM framework is choice of the uncertainty dataset, the paper lacks discussion on the choice of this dataset in practice. How big should this dataset be? How to curate this dataset on a new problem? Since a large capacity neural network can overfit even an uncertainty set without some considerations. \n\n- Some inconsistencies in the empirical evaluation (see below)", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "This work proposes Data-Driven Confidence Minimization (DCM) frameworks that minimizes confidence on an uncertainty dataset curated during training to help make better predictions on unknown inputs at test time. It applies the DCM frameworks to Out-of-Distribution (OOD) detection and selective classification problems. At the heart of this framework lies two components: (a) curate an uncertainty set on which the model makes uncertain predictions during training, and (b) minimize a training object that balances target objective (such as classification error on train set) and confidence on the uncertainty set. Such a minimizer aims to make less confidence predictions on inputs where it is uncertain, and make confident predictions on the inputs where it is certain.\n\nDCM works by first pre-training the model to achieve a good performance on the training set (albeit at the cost of overfitting the training set). Then, it proceeds to curate an uncertainty set, which is used during the fine-tuning phase, where DCM minimizes the target objective along with minimizing the confidence on the uncertainty set. \n\nThis work performs empirical evaluations against a variety of Selective Classification and OOD detection datasets to test the proposed DCM framework.", "claims_and_evidence_yn": "Yes", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "Questions for Authors:\n------------\n- What stops the Algorithm 1 to simply overfit the validation examples? \n- In practice, how do you justify the assumption that the uncertainty set consists of unknown examples?\n- Any reasons to not include CIFAR-100 for Selective Classification evaluation?\n- What is the inference procedure? How does the method reject prediction during the test time?\n- Do you have any practical advice for curating the uncertainty dataset on a new problem setting? How large should this dataset be compared to the training set? \n- In Table 1, what inference one should make from the ID part of the table, where many baselines are significantly better than proposed DCM framework?\n- In Table 1, why is the ensemble method consistently amongst the top performing schemes?  \n- What is the computational overhead associated with the DCM framework? How much is the additional training time compared to the baselines?", "broader_impact_concerns": "N/A", "additional_comments": "", "extra_scores": {}, "extra_text": {}}, {"review_id": "24qmAYIoNN", "reviewer": "Reviewer_GpJw", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "Strengths:\n\n1.  The introduction of Data-Driven Confidence Minimization (DCM) provides a unified method for selective classification and out-of-distribution (OOD) detection using held-out validation and samples from OOD, offering a fresh perspective on these tasks.\n\n2. The authors provide theoretical guarantees and extensive empirical evaluation supporting the efficacy of the DCM objective in separating known and unknown data.\n\nWeaknesses:\n\n1. There are two separate versions of DCM each solving a different objective for selective classification(SC)  and OOD detection. In practice, we would like to train a classifier once and ensure that during deployment it is doing both SC and OOD detection. \n\n2. It is not clear how is the confidence threshold selected for selective classification and what kind of error and coverage guarantees can be provided for this setting when using DCM. \n\n3. The method requires validation and unknown samples but it is not clear how many such samples are required by the method to ensure certain performance guarantees.", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "The paper introduces Data-Driven Confidence Minimization (DCM) as a unified method for conservative prediction in selective classification and out-of-distribution (OOD) detection. It outlines a practical approach to construct an uncertainty dataset tailored to each problem setting. For selective classification (SC), the uncertainty dataset comprises misclassified examples from a separate validation set, mirroring potential misclassifications during testing. In OOD detection, the uncertainty dataset consists of unlabeled examples from the test distribution, including both known and unknown instances. The authors acknowledge that unlabeled test examples might not always be accessible but highlight real-world scenarios, such as unannotated medical data from new hospitals, where they are present. The theoretical guarantees suggest that minimizing the DCM objective can provably separate known and unknown data with an appropriate threshold on the maximum softmax probability. The authors evaluate the DCM method empirically for SC and OOD detection. In SC, it achieves a 2.3% increase in performance under distribution shift conditions and surpasses an ensemble of models despite lower computational costs. In OOD detection, DCM outperforms Outlier Exposure by reducing False Positive Rates by 6.3% and 58.1% on CIFAR-10 and CIFAR-100 datasets, respectively. Moreover, it demonstrates strong performance in challenging near-OOD detection settings, achieving higher AUROC values than state-of-the-art methods.", "claims_and_evidence_yn": "Yes", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "1. Please state the assumptions clearly in the main paper.\n2. If possible, unify Algorithm 1 and 2 in a single procedure that can give a single model that would work for both OOD and SC.\n3. There are works providing threshold estimation procedures [1,2] for selective classification. I suppose these methods could be utilized in this work and might improve the performance further.\n\n\n[1] https://openreview.net/pdf?id=RUCFAKNDb2\n\n[2] https://arxiv.org/pdf/1705.08500.pdf", "broader_impact_concerns": "N/A.", "additional_comments": "", "extra_scores": {}, "extra_text": {}}, {"review_id": "vYGjbbzKDu", "reviewer": "Reviewer_jSVF", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "**Strengths**\n\n- The authors provide a wide suite of experiments on both small-scale (CIFAR) and higher-resolution (ImageNet-1k) data.\n\n- Ample details with regards to the aforementioned experiments are provided to aid reproducibility.\n\n- DCM performs exceptionally well on the task of OOD detection, demonstrating \n\n\t- the advantage of using OOD data from the test-time distribution for confidence minimisation\n\n\t- that it is not necessary to exclude ID data from confidence minimisation\n\n- DCM shows promising performance for selective classification under covariate shift\n\n**Weaknesses** \n\n1. There is a lack of transparency with regards to the effect of DCM on in-distribution top 1 accuracy. This is relegated to Appendix J when it should be clearly available to the reader. That is to say a ~-3% decrease for CIFAR-100 and ImageNet-1k.\n\t\n2. Positioning with regards to Katz-Samuels et al [1].\n\n    - The authors treat WOODS from [1] as a competing method but disregard the fact that in [1] DCM (both energy and softmax) is the baseline approach as the uncertainty dataset in [1] is constructed in the same way as this paper. In [1] WOODS is shown to outperform DCM, so there should be discussion in this paper as to why the reverse occurs here.\n\t\n    - One of the advantages of WOODS is the explicit objective of preserving ID top 1 accuracy. This is not discussed in the paper and is especially relevant as DCM appears to reduce top 1 accuracy (see 1.)\n\t\t\n3. My impression is that the theoretical insights don't apply to real-world image data (the notation is quite confusing here so I welcome the authors to correct me if I'm wrong).\n\n\t- Proposition A.4 in Appendix A.3 applies to $\\delta$-balls around the data points in the uncertainty set. \n\n\t- My understanding is that it is suggested test-time ID and OOD images will fall into $\\delta$-balls near the ID and OOD images in the uncertainty set.\n\n\t- Distances in the image space are somewhat meaningless semantically (adversarial attacks rely on this). For example, translation can move an image a large distance whilst barely changing the semantics. Drawing thin legs on a snake makes it a lizard but moves the image a small distance.\n\n\t- Thus it doesn't make sense to assume that any test-time ID/OOD samples will fall within $\\delta$-balls near the corresponding uncertainty set images. \n\n\t- I still think that the intuition presented however is perfectly valid in my eyes, i.e. cross entropy cancels out the effect of confidence minimisation on the ID samples, allowing ID and OOD to be separated.\n\t\t\n4. There is no acknowledgement of the problem scenario where *both* OOD and misclassified samples should be detected [2,3]. Although it is not necessary to fully explore it in this paper, it should be at the least discussed as\n\n\t- There is potential to expand the approaches in this paper to the setting above. \n\n\t- DCM solely for OOD or SC may have an adverse effect on the other task. This is salient as one way to improve OOD detection is to (relatively) increase confidence on ID misclassifications [3].\n\t\t\n5. Although DCM performs well for selective classification under covariate shift, there is little discussion as to why this might be the case. The authors do not provide any useful insight or disentangle the contributions of better top1 accuracy and better misclassification detection as both can improve SC.\n\t\n6. Confusing/imprecise notation/terminology\n\n\t- \"OOD\" used to refer to both semantic and covariate shift [4] without distinction.\n\n\t- $D_u, D_{unc}, D_{tr}, D^{train}, D^{test},  D^{test}_{unk}$ (which is used for the *training* uncertainty set?)\n\n    - \"Calibrate\" in 3.1 can be easily misunderstood as DCM is orthogonal to classifier confidence calibration as defined in Section 6.\n\n**Queries**\n\n1. The results for the Ensemble on CIFAR-10 seem to be off (no accuracy change vs single model, Tab. 17). I would encourage the authors to double-check their implementation as in my experience ensembling should give ~+1% accuracy boost on that dataset.\n\n\n\n[1] Katz-Samuels et al. Training OOD Detectors in their Natural Habitats, ICML 2022\n\n[2] Jaeger et al. A Call to Reflect on Evaluation Practices for Failure Detection in Image Classification, ICLR 2023\n\n[3] Xia and Bouganis. Augmenting Softmax Information for Selective Classification with Out-of-Distribution Data, ACCV 2022\n\n[4] Yang et al. Generalized Out-of-Distribution Detection: A Survey, 2021", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "No", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "- The authors present a training-based framework to improving uncertainty estimation termed DCM, where the model is trained to minimise its confidence on an \"uncertainty dataset\" which should contain samples that are representative of \"unknowns\" encountered at test time.\n\n- They provide some theoretical results regarding DCM of limited practical utility.\n\n- They show promising results for their approach in the scenarios of selective classification under distribution shift, and very strong results for OOD detection.", "claims_and_evidence_yn": "No", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "**Critical** (I will recommend acceptance if the below changes/additions are made)\n\n1. Top 1 accuracy results should be visible in all tables in the main paper.\n\n2. DCM should be better compared with [1] \n\n\t- DCM for OOD detection should be clarified as an existing baseline approach in [1]\n\n\t- How top 1 accuracy differs to WOODS \n\n\t- How DCM outperforms WOODS in OOD detection here but not in [1]\n\n3. Short discussion on rejecting *both* ID misclassifications *and* OOD samples with accompanying references [2,3] and how this problem setting may relate to DCM (additional experiments not necessary, sufficient to leave as possible future work).\n\n4. Clarification on the limitations of Proposition 4.2 with regards to image-space distances.\n\n**Non-Critical**\n\n1. Notation that is clearer and less confusing to the reader.\n\n2. More useful insight as to why DCM improves SC (and top 1 accuracy) on covariate-shifted data.\n\n3. Ideally I would prefer Section 4 to be rewritten to instead illustrate the intuition behind DCM rather than contain somewhat irrelevant theory.", "broader_impact_concerns": "None", "additional_comments": "", "extra_scores": {}, "extra_text": {}}]

Author rebuttal:

Meta-review: After review and author feedback, the reviewers think that the presented DCM method seems to be generally useful and could potentially be widely applicable to problems related to uncertainty estimation in OOD settings. Although they also pointed out that the experimental gains in the experiments against other baselines are not very significant. 

One reviewer also mentioned that the paper could benefit from a better explanation of the intuition behind the method, especially on the analysis of its experimental performance. I would encourage the authors to make an effort on this in revision.

As a side note, I would recommend a short discussion on data augmentation in uncertainty quantification and OOD detection context. E.g., see this paper https://proceedings.mlr.press/v115/hafner20a.html
Decision: Accept (poster)