On the Importance of Feature Separability in Predicting Out-Of-Distribution Error
Authors: RENCHUNZI XIE
Hongxin Wei
Lei Feng
Yuzhou Cao
Bo An
Venue: NeurIPS 2023 poster (2023)
Keywords: Machine Learning
Uncertainty Estimation

Abstract: Estimating the generalization performance is practically challenging on out-of-distribution (OOD) data without ground-truth labels. While previous methods emphasize the connection between distribution difference and OOD accuracy, we show that a large domain gap not necessarily leads to a low test accuracy. In this paper, we investigate this problem from the perspective of feature separability empirically and theoretically. Specifically, we propose a dataset-level score based upon feature dispersion to estimate the test accuracy under distribution shift. Our method is inspired by desirable properties of features in representation learning: high inter-class dispersion and high intra-class compactness. Our analysis shows that inter-class dispersion is strongly correlated with the model accuracy, while intra-class compactness does not reflect the generalization performance on OOD data. Extensive experiments demonstrate the superiority of our method in both prediction performance and computational efficiency.

On the Importance of Feature Separability in Predicting Out-Of-Distribution Error
Renchunzi Xie!
Hongxin Wei
Lei Feng'
Yuzhou Cao
Bo An
1 School of Computer Science and Engineering, Nanyang Technological University, Singapore
2 Department of Statistics and Data Science, Southern University of Science and Technology. China
(xier0002, (xier0002,yuzzhuu000 yuz0ou002zzou .ntu.. atu.edu..s. weihxdsustech. edu. 1 1fenggaq@gmail. com boanEntu. edu. sg
Abstract
Estimating the generalization performance is practically challenging on out-of- distribution (OOD) data without ground-truth labels. While previous methods emphasize the connection between distribution difference and OOD) accuracy, we show that a large domain gap not necessarily leads to low test accuracy. In this paper, we investigate this problem from the perspective of feature separability empirically and theoretically. Specifically, we propose dataset-level score based upon feature dispersion to estimate the test accuracy under distribution shift. Our method is inspired by desirable properties of features in representation learning: high inter-class dispersion and high intra-class compactness. Our analysis shows that inter-class dispersion is strongly correlated with the model accuracy, while intra-class compactness does not reflect the generalization performance on OOD data. Extensive experiments demonstrate the superiority of our method in both prediction performance and computational efficiency.
1 Introduction
Machine learning techniques deployed in the open world often struggle with distribution shifts, where the test data are not drawn from the training distribution. Such issues can substantially degrade the test accuracy, and the generalization performance of trained model may vary significantly different shifted datasets Cainonero-Candee et al., 2008, Koh et al., 2021]. This gives rise to the importance of estimating out-of-disstibution (OOD) errors for Al Safety [Deng and Zheng, 202 1]. However, it is prohibitively expensive or unrealistic to collect large-scale labeled examples for each shifted testing distribution encountered in the wild. Subsequently, predicting OOD error becomes challenging task without access to ground-tre -trth labels.
In the literature, popular direction in predicting OOD error is to utilize the model output on the shifted dataset [Jiang et al., 2021, Guillory et al., 2021, Garg et al., 2022], which heavily relies on the model calibration. Yet, machine learning models generally suffer from the overconfidence issue even for OOD inputs [Wei et al., 2022], Icading to suboptimal performance in estimating OOD performance. Many prior works turned to measuring the distribution difference between training and OOD test set, due to the conventional wisdom that a higher distribution shift normally leads to lower OOD accuracy. AutoEval [Deng and Zheng, 2021] applies Fréchet Distance to caleulate the distribution distance for model evaluation under distribution shift. A recent work [Yu et al., 2022]
"Corresponding Author
37th Conference on Neural Information Processing Systems (NcurIPS 2023).

---

introduces Projection Norm (ProjNorm) metric to measure the distribution discrepancy in network parameters. However, we find that the connection between distribution distance and generalization performance does not always hold, making these surrogate methods to be questionable. This motivates our method, which directly estimates OOD accuracy based on the feature properties of test instances.
In this work, we show that feature separability is strongly associated with test accuracy, even in the presence of distribution shifts. Theoretically, we demonstrate that the upper bound of Bayes error is negatively correlated with inter-class feature distances. To quantify the feature separability, we introduce a simple dataset-level statistic, Dispersion Score, which gauges the inter-class divergence from feature representations, i.e., outputs of feature extractor. Our method is motivated by the desirable properties of embeddings representation learning [Bengio al., 2013]. To achieve high accuracy, we generally desire embeddings where different classes are relatively far apart (i.c., high inter-class dispersion), and samples in each class form a compact cluster (i.e., high intra-class compactness). Surprisingly, our analysis shows that intra-class compactness does not reflect the generalization performance, while inter-class dispersion is strongly correlated with the model accuracy on OOD data.
Extensive experiments demonstrate the superiority of Dispersion Score over existing methods for estimating OOD error. First, our method dramatically outperforms existing training-fiee -free methods in evaluating model performance on OOD data. For example, our method leads to an increase of the R² from 0.847 to 0.970 on TinylmageNet-C [Hendrycks and Dietterich, 2019] - 14.5% of relative improvement. Compared to the recent ProjNorm method [Yu al., 2022], our method not only achieves superior performance by a meaningful margin, but also maintains huge advantages in computational efficiency and sample efficiency. For example, using CIFAR- 10C dataset as OOD data, Dispersion Score achieves an R of 0.972, outperforming that of Nrom (i.e., 0.947), while our approach only takes around 3% of the time consumed by ProjNorm.
Overall, using Dispersion Score achieves strong performance in OOD error estimation with high computational efficiency. Our method can be easily adopted in practice. It straightforward to implement with deep learning models and does not require access to training data. Thus our method compatible with modern settings where models are trained on billions of images.
We summarize our main contribution as follows:
1. We find that the correlation between distribution distance and generalization performance does not always hold, downgrading the reliability of existing distance- methods.
2. Our study provides empirical evidence supporting significant association between feature separability and test accuracy. Furthermore, we theoretically show that increasing the feature distance will result in decrease in the upper bound of Bayes error.
3. We propose simple dataset-level score that gauges the inter-class dispersion from feature representations, i.e., outputs of feature extractor. Our method does not rely on the information of training data and exhibits stronger flexibility in OOD test data.
4. We conduct extensive evaluations to show the superiority of the Dispersion Score in both prediction performance and computational efficiency. Our analysis shows that Dispersion Score is more robust to various data conditions in OOD data, such limited sample size, class imbalance and partial label set. Besides, we show that intra-class compactness does not reflect the generalization performance under distribution shifts (SubSection 4.4).
2 Problem Setup and Motivation
2.1 Preliminaries: OOD performance estimation
Setup In this work, we consider multi-class classification task with l: classes. We denote the input space as X and the label space as y kk)...,k.. We assume there is training dataset D = (z,, yi J where the n data points are sampled i.i.d. from a joint data distribution Pxy. During training, we learn a neural network f X + R with trainable parameters d E Rp on D.
In particular, the neural network f can be viewed as combination of feature extractor fg and classifier fw, where g and w denote the parameters of the corresponding parts, respectively. The feature extractor fy is a function that maps instances to features fg X - Z, where Z denotes the

---

feature space. We denote by 2; the learned feature of instance a;: 2; fz(;). The classifier fw is function from the feature space Z to Rt which outputs the final predictions. A trained model can be obtained by minimizing the following expected risk:
R2(f) = -xxx))~xx (f(z)))),
= ((a.y))>Pa
Problem statement At time, we generally expect that the test data are drawn from the same distribution as the training dataset. However, distribution shifts usually happen in reality and even simple shifts can lead large drops in performance, which makes it unreliable in safety-critical applications. Thus, our goal is to estimate how trained model might perform on the shifted data without labels, i.e., unlabeled outoof-distribution (OOD) data.
Assume that D { N be the OOD test dataset and {ūr 1 be the corresponding unobserved labels. For a certain test instance H; we obtain the predicted labels trained model by 8 argmax I (ā:)). Then the ground-truth test error OOD data can be formally defined as:
1 = m Σ
Err(D)
10 Th)
To estimate the real OOD error, the key challenge is to formulate score S(D) that is strongly correlated with the test error across diverse distribution shifts without utilization of corresponding test labels. With such scores, simple linear regression model can be learned to estimate the test error on shifted datasets, following the commonly used scheme [Deng and Zheng, 2021, Yu et al., 2022].
While those output-based approaches suffer from the overconfidence issue [Hendrycks and Gimpel, 2016, Guillory al., 2021], other methods primarily rely on the distribution distance between training data D and test data 2 [Deng and Zheng, 2021. Tzeng et al., 2017], with the intuition that the distribution gap impacts classification accuracy. In the following, we motivate our method by analyzing the failure of those methods based on feature-level distribution distance.
2.2 The failure of distribution distance
In the literature, distribution discrepancy has been considered as a key metric to predict the general- ization performance of the model on unseen datasets [Deng and Zheng, 2021, Tzeng al., 2017, Gao and Kleywegt, 2022, Sinha et al., 2017, Yu et al., 2022]. AutoEval [Deng and Zheng, 2021] estimates model performance by quantifying the domain gap in the feature space:
S(D,)) d),,
where d(-) denotes the distance function, such as Fréchet Distance [Dowson and Landau, 1982] or maximum mean discrepancy (MMD) [Gretton et al., 2006].
ProjNorm measures the distribution gap with the Euclidean distance in the parameter space:
S(D, D) -10--
where 0 and Ø denote the parameters fine-tuned on training data D and OOD data D, respectively.
The underlying assumption is inherited from the conventional wisdom in domain adaptation, where a representation function that minimizes domain difference lcads to higher accuracy in the target domain [Tzeng al., 2014, Ganin and Lempitsky, 2015, Tzeng et al., 2017]. Yet, the relationship between distribution distance and test accuracy remains controversial. For example, the distribution shift may not change the model prediction if the classifier's 's outputs are insensitive to changes in the shifted features. There naturally arises a question: given a fixed model, does a larger distribution distance always lead to lower test accuracy?
To verify the correlation between distribution distance and model performance, we compare the model performance on different OOD test sets of CIFAR-10C, using the ResNet-50 model trained on CIFAR-10. 10. For each OOD test set, we calculate the distribution distances in the feature space Z via Fréchet distance [Dowson and Landau, 1982] and MMD [Gretton al., 2006], respectively.

---

(a) Fréchet
(b) MMD
Figure 1: Distribution Gap Vs. OOD accuracy on CIFARIO-C via (a) Fréchet distance [Dowson and Landau, 1982] and (b) MMD [Gretton et al., 2006]. All colors indicate 14 types of corruption. The test accuracy varies significantly on shifted datasets with the same distribution distances.
Figure presents the classification accuracy the distribution distance. The results show that, on different test datasets with similar distances to the train data in the feature space. the performance of the trained model varies significantly with both the two distance metrics. For example, calculated by Fréchet distance, the distribution gap varies only a small margin from 223.36 to 224.04, but the true accuracy experiences large drop from 61.06% to 46.99%. Similar to MMD distance, when the distribution gap changes from 87.63 to 88.35, the OOD accuracy drops from 66.53% to 47.73% The high variability in the model performance reveals that, the distribution difference not reliable surrogate for generalization performance under distribution shifts.
3 Proposed Method
In this section, we first introduce the intuition of our method with a natural example. Next, we characterize and provide quantitative measure on the desirable properties of feature representations for predicting OOD error. We then present the advantages of our proposed method.
3.1 Motivation
In representation learning, it is desirable to learn separable feature space, where different classes far away from each other and samples in each class form a compact cluster. Therefore, separability viewed important characteristic train a nearest neighbor classifier over the learned representation using labeled data and regard its performance as the indicator. In this paper, investigate how to utilize the characteristic of separability for estimating the model performance under distribution shifts, without access to ground-truth labels.
measure the feature quality. For example,
may
Intuitive example In Figure we present a t-SNE visualization of the representation for training and test data. In particular, we compare the separability of the learned representation on shifted datasets with various severity. While the feature representation of training data exhibits well-separated clusters, those of the shifted datasets more difficult to differentiate and the cluster gaps are well correlated with the corruption severity, as well as the ground toound-rruth accuracy. It implies that, model with high classification accuracy is usually along with separate feature distribution, and vice versa. With the intuition, we proceed by theoretically showing how the feature separability affects the classification performance.
Theoretical explanation Recall that we obtain the model prediction by v/ arg max far (2,). where the intermediate feature 2; = f (2;). Let Ply = i) denote the prior class probability of class i, and p(ær ly i) denote the class likelihood, i.e., the conditional probability density of x given that belongs class i. Then the Bayes error [Young and Calvert, 1974, Devijver and Kittler, 1982, Webb and Copsey, 1990, Duda et al., 2006] can be expressed

---

CIFAR-10 ID dafaset
Seveniy: 1 Accuracy: 93,96
Severity. 3 Accuracy. 87.83
Severity. 5 Accuracy: 48.77
Figure 2: t-SNE visualization of feature representation on training and OOD test datasets (CIFAR- 10C) with contrast corruption under different severity levels. The first left figure shows feature representation of the training dataset, while the rest of three figures illustrate those of the OOD datasets. From this figure, we observe that different clusters tends to more separated as the corruption severity level gets smaller.
K Σ
Euayes =
P -
i) 11y=i)p(a)
i) dx,
where C; is the region where class i has the highest posterior. The Bayes error rate provides a lower bound the error rate that can be achieved by any pattern classifier acting on derived features. However, the Bayes error is not so readily obtainable as class priors and class-conditional likelihoods are normally unknown. Therefore, many studies have focused on deriving meaningful upper bounds for the Bayes error [Devijver and Kittler, 1982, Webb and Copsey, 1990].
For binary classification problem where k 2. we have
2P (v - PP(==))(y=22
Evayes
(2)
where denotes the distance between features from the two classes [Devijver and Kittler, 1982, Tumer and Ghosh, 2003], such as Mahalanobis distance [Chandra et al., 1936] or Bhattacharyya distance [Fukunaga, 2013]. Based on the Bayes error for 2-class problems, the upper bound can be extended to the multi-class setting (k > 2) by the following equation [Garber and Djouadi, 1988].
-
bayes
min (0(1,))
k:
2
(1 P(y = i)) bayes 1=1
20:
where a is an optimization parameter, With Equations 2 and we obtain an upper bound of Bayes error, which is negatively correlated with the inter-class feature distances. Specifically, increasing the feature distance will result in a decrease the upper bound of Bayes error. this manner, we provide mathematical intuition for the phenomenon shown in Figure 2. However, Computing the upper bound Bayes error directly, as indicated above, challenging due to its computational complexity. To circumvent this issue, propose straightforward metric as substitute, which does not require access to label information.
3.2 Dispersion score
In our previous analysis, we show strong correlation between the test accuracy and feature sepa- rability under different distribution shifts. To quantify the separability in the feature space Z, we introduce Dispersion score that measures the inter-class margin without annotation information.
First, allocate OOD instances ( )2 into different clusters based the model predictions, i.e., their pseudo labels from the trained classifier fo: j = %% = arg max (2,).
With these clusters, we compute the Dispersion centroid ش0 my E 2, 1 11% = j} and the center of all features ç 1 m Σn Zi. weighted by the sample size of each cluster my. Formally, the Dispersion score is defined as:
by the average distances between each cluster
1
S(D)
my (p. (1,)
5

---

where k - 1 is the degree of freedom and yp denotes the distance function. With the weight my, the induced score receives a stronger influence from those larger clusters, ie., the majority classes. This enables our method to be more robust to the long-tailed issue, which naturally arises in the unlabeled OOD data. In subsection 4.3, we explicitly show the advantage of our method in the class-imbalanced case and analyze the importance of the weight in Appendix 4.5.
In particular, we use square Euclidean distances to calculate the distance in the feature space Z. So converts to:
Σ
k
m, 1 14
S(D)
log
(4)
k
Following the common practice [Jiang et al., 2019], adopt log transform the final score, which corresponds to multiplicative combination class statistics.
We summarize approach in Appendix A. Notably, the Dispersion score derived from the feature separability offers several compelling advantages:
1. Training data free. The calculation procedure of proposed score does not rely on the information of training data. Thus, our method is compatible with modern settings where models are trained on billions of images.
2. Easy-to-use. The computation of the Dispersion score only does forward propagation for each test instance once and does not require extra hyperparameter, training a new model, or updating the model parameters. Therefore, method is easy to implement in real-world tasks and computational efficient, as demonstrated in Tables 2 and 3.
3. Strong flexibility in OOD data. Previous state-of-the-ar art methods, like ProjNorm [Yu et al., 2022], usually requires large amount of OOD data for predicting the prediction performance. Besides, the class distribution of unlabeled OOD datasets might severely imbalanced, which makes it challenging to estimate the desired test accuracy balanced data. In Subsection 4.3, we will show the Dispersion score derived from the feature separability exhibits stronger flexibility and generality in sample size, class distribution, and partial label set (see Subsection 4.3 and Appendix E).
4 Experiments
In this subsection, we first compare the proposed score to existing training- free methods. Then, we provide an extensive comparison between our method and recent state-of-ther method - Projjorm. We then show the flexibility of our method under different settings of OOD test data. Additionally, we present an analysis of using ground-truth labels and K-means Appendixes C and 4.6. Finally, we discuss the limitation of the proposed score for adversarial setting in Appendix F.
4.1 Experimental Setup
Train datasets. During training, we train models on the CIFAR-IO, CIFAR-100 [Krizhevsky et al., 2009] and TinyImageN [Le and Yang, 2015] datasets. Specifically, the train data of CIFAR-10 and CIFAR-IOM contain 50,000 training images, which are allocated to 10 and 100 classes, respectively. The TinylmageNet dataset contains 100,000 64 x 64 training images, with 200 classes
Out-of-distribution (OOD) datasets. To evaluate the effectiveness of the proposed method on predicting OOD error at test time, we use CIFAR-10C and CIFAR-IOOC [Hendrycks and Dietterich, 2019], which span 19 types of corruption with 5 severity levels. For the testing of TinylmageNet, we use TinyImageNer-G [Hendrycks and Dietterich, 2019] that spans 15 types of corruption with severity levels as OOD dataset. All the datasets with certain corruption and severity contain 10,000 images, which are evenly distributed in the classes.
Evaluation metrics. To measure the linear relationship between OOD error and designed scores, use coefficients of determination (R²) and Spearman correlation coefficients (p) as the evaluation metrics. For the comparison of computational efficiency, calculate the average evaluation time (T) for each test set with certain corruption and severity.
Training details. During the training process, we train ResNer1 8, ResNet50 [He et al., 2016] and WRN-5002 W and Komodakis, 2016] on CIFAR-10, 10, CIFAR-100 [Krizhevsky et al., 2009] and TinyImageNet [Le and Yang, 2015] with 20, 50 and 50 epochs, respectively. We use SGD with

---

Table 1: Performance comparison of training free approaches CIFAR-10, 10, CIFAR- 100 and Tiny- ImageNet, where R² refers to coefficients of determination, and p refers to Spearman correlation coefficients (higher is better). The best results are highlighted in bold.
Rotation
ConfScore
Entropy
AgreeScore
ATC
Fréchet
Ours
Dataset
Network
R
e
R
P
R
P
R²
P
R²
p
R²
p
R-
P
ResNet18
0.822
0.951
0.869
0.985
0.899 0.987
0.663 0.929
0.884
0.985
0.950
0.971
0.968
0.990
ResNet50
0.835
0.961
0.935 0.993 0.945 0.994 0.835 0.985 0.946
0.994
0.858
0.964
0.987 0.990
CIFAR
WRN-50-2
0.862
0.976 0.943 0.994 0.942 0.994 0.856 0.986 0.947 0.994
0.814
0.973
0.962 0.988
Average
0.840
0.963 0.916 0.991 0.930
0.992 0.785 0.967 0.926
0.991
0.874
0..770
0.972 0.990
ResNe118
0,860
0,936 0,916 0.985 0.891 0.979 0.902 0.973 0.938
0.986
0,888
0.968
0.952 0.988
ResNet50
0,908 0.962 0.919 0.984 0.884 0.977 0.922 0.982 0.921 0.984
0.837
0.972
0.951 0.985
CIFAR 100
WRN-50-2
0,924 0,970 0.971 0.984 0.968 0.981 0.955 0.977 0.978 0.993 0.865
0.987
0.980 0.991
Average
0.898 0.956 0.936 0.987 0.915 0.983 0.927 0.982 0.946
0.988
0.864
0.976
0.962 0.988
ResNet18
0.786 0,946 0,670 0.869 0.592 0.842 0.561 0.853 0.751
0.945
0.826
0.970
0.966 0.986
ResNe150
0,786 0,947 0.670 0.869 0.651 0.892 0.560 0.853 0.751
0.945
0.826 0.971 0.977 0.986
TinyImageNet
WRNt-50-2
0.878 0.967 0.757 0.951 0.704 0.935 0.654 0.904 0.635 0.897 0.884 0,984 0.968 0.986
Average
0.805 0.959 0.727 0.920 0.650 0.890 0.599 0.878 0.693 0.921 0.847 0.976 0.970 0.987
Frechet 0DD
ProjNorm v.s. Errer
Dispersion Score v.s. Error
70
70
70
000 Error
50
OGD Eror
50
ogp Eror
50
40
40
300
30
30
20
10
10
10
200
300 Frechet
400 500
5.0
12.5
-2.0
12.5
21.0
-10.5
ProjNomm
Negative Dispersion Score
Figure 3: OOD error prediction versus True OOD error on CIFAR-10 with ResNer50. We compare the performance of Dispersion Score with that of ProjNorm and Fréchet via scatter plots. Each point represents one dataset under certain corruption and certain severity, where different shapes represent different types of corruption, and darker color represents the higher severity level.
the learning rate of 10-3, 3, cosine learning rate decay [Loshchilov and Hutter, 2016), a momentum of 0.9 and batch size of 128 to train the model.
The compared methods. We consider 7 existing methods as benchmarks for predicting OOD error: Rotation Prediction (Rotation) [Deng et al., 2021], Averaged Confidence (ConiScore) [Hendrycks and Gimpel, 2016], Entropy [Guillory al., 2021], Agreement Score (AgreeScore) [Jiang et al., 2021], Averaged Threshold Confidence (ATC) [Garg et al., 2022], AutoEval (Fréchet) [Deng and Zheng, 2021], and ProjNorm [Yu et al., 2022]. Rotation and AgreeScore predict OOD error from the view of unsupervised loss constructed by generating rotating instances and measuring output agreement of two independent models, respectively. ConfScore, Entropy, and ATC formulate scores by model predictions. Proj measures the parameter-level difference between the models fine-tuned on train and OOD test data respectively, while Fréchet quantifies the distribution difference in the feature space between the training and test datasets. We present the related works in Appendix B.
4.2 Results
Can Dispersion score outperform existing training free approaches? In Table 1, we present the performance of OOD eгтor estimation on three model architectures and three datasets. We find that Dispersion Score dramatically outperforms existing training-free free methods. For example, averaged across three architectures on TinyImageNet, our method leads to an increase of the R² from 0.847 to 0.970 - a 14.5% of relative improvement. In addition, Dispersion Score achieves consistently high performance over the three datasets with a R² higher than 0.950, while scores of other approaches such as Rotation varying from 0.787 to 0.924 are not stable. We observe a similar phenomenon on P. where the Entropy method achieves performance that is ranging from 0. 0.842 to 0.994, while the performance of our method fluctuates around 0.988.
7

---

Table Performance comparison between ProjNorm Yuu et al., 2022] and our Dispersion score on CIFAR-10. 10, CIFAR- 100 and Tiny Imagmee,,,t, where R² refers to coefficients of determination, refers to Spearman correlation coefficients (higher is better), and 7 refers average evaluation time (lower is better). The best results are highlighted in bold.
ProjNorm
Ours
Dataset
Network
I[=
P
ResNet18
0.936
0.982
179.616
0.968
0.990
10.980
ResNet50
0.944
0.989
266.099
0.987
0.990
11.259
CIFAR 10
WRN-50-2
0.961
0.989
575.888
0,962
0.988
11.017
Average
0.947
0.987
326.201
0,972
0.990
T1,855
ResNet18
0.979
0.980
180.453
0,952
0.988
6,997
ResNet50
0.988
0.991
262.831
0,953
0.985
11.138
CIPAR 100
WRN-50-2
0.990
0.991
605.616
0,980
0.991
12.353
Average
0.985
0.987
349.63
0.962
0,988
10.163
R8
0.970
0.981
182.127
0.966
0.986
7.039
ResNet50
0.979
0.987
264.651
0.977
0.990
13.938
TinylmageNet
WRN-50-2 50-2
0.965
0.983
590,597
0.968
0.986
11.235
Average
0.972
0.984
345.792
0.970
0,987
10.737
Priherm
0.55
0.05
3.90
0.90
0.50
0.80
50
1.00
400
0.75
200
400
The number samples
The number of samples
(a) ResNet18
(b) ResNet-50
Figure 4: Prediction performance R²2 vs. sample size OOD data (subsets of CIFAR-IOC) with (a) ResNet18 and (b) ResNet50.
Dispersion score is superior to ProjNorm. In Table 2, we compare method to the recent state- of-the-art method ProjNrom [Yu et al., 2022] in both prediction performance and computational efficiency. The results illustrate that Dispersion Score could improve the prediction performance ProjNorm with a meaningful margin. For example, with trained models on CIFAR- dataset, using Dispersion score achieves a R² of 0.953, much higher than the average performance of ProjNorm as 0.873. On CIFAR-100, our method also achieves comparable (slightly better) performance with ProjNorm (0.961 0.948). Besides, Dispersion computational efficiency. Using WRN-50-2, ProjNorm takes an average of 575 seconds for estimating the performance of each OOD dataset, while our method only requires 11 seconds. Since the computation of Dispersion score does not needs to update model parameters or utilize the training data, method enables predict OOD error with large-scale models trained on billions of images.
obtains huge advantages ProjNorm in
To further analyze the advantage our method, we present in Figure 3 the scatter plots for Fréchet, ProjNorm and Dispersion Score CIFAR-10C with ResNet50. From the figure, we find that Dispersion Score estimates OOD errors linearly w.r.t. true OOD errors in all cases. In contrast, observe that those methods based distribution difference tends to fail when the classification error is high. This phenomenon clearly demonstrates the reliable and superior performance of the Dispersion score in predicting generalization performance under distribution shifts.
4.3 Flexibility in OOD data
In previous analysis, we show that Dispersion score can outperform existing methods on standard benchmarks, where the OOD test datasets contain sufficient instances and have balanced class distribution. In reality, the unlabeled OOD data are naturally imperfect, which may limit the performance of predicting OOD error. In this part, we verify the effectiveness of our method with long-tailed data and small data, compared to ProjNorm [Yu et al., 2022].

---

Table 3: Summary of prediction performance on Imbalanced CIFAR-I06 and CIFAR-1000
[Hendrycks and Dietterich, 2019], where R refers to coefficients of determination, refers to Spearman correlation coefficients (higher is better), and 7 refers average evaluation time (lower
better). The best results are highlighted in bold. More results can be found in Appendix D.
ProjNorm
Ours
Dataset
Network
Ri2
T
R²
p
T
R8
0.799
0.968
204.900
0.959
0.982
2.076
ResNet50
0.897
0.980
430.406
0.968
0.982
3,295
CIFAR
WRN-50-2
0.922
0.978
561.611
0.932
0.978
2.970
Average
U.873
0.973
398.972
0.953
0,980
2.780
ResNet18
0.886
0.968
210.05
0.941
0.982
1.864
ResNet50
0.980
0.988
433.860
0,956
0.982
2.974
CIFAR 100
WRN-50-2
0.978
0.982
768 188.883
0.986
0.994
3.242
Average
0.948
0.980
470.951
0,961
0,986
2.693
Class imbalance. We first evaluate the prediction performance under class imbalanced setting. In particular, given trained model, aim to estimate its balanced accuracy under distribution shift while we only have access to a long-tailed test data, where a few classes (majority classes) occupy most of the data and most classes (minority classes) under-represented. We conduct experiments on CIFAR- 10C and CIFAR 100C with imbalance rate 100.
Our results in Table 3 show that Dispersion Score achieves better performance than ProjNorm [Yu et al., 2022] under class imbalance. For example, our approach achieves an average I²² of 0.953 on CIFAR-106 with 2.780 seconds, while ProjNorm obtains an R² of 0.873 and takes 398.972 seconds. In addition, the performance of our method more stable across different model architectures and datasets with the R ranging from 0.932 0.986 than Proj (0.799 0.980). Overall, Dispersion score maintains reliable and superior performance even when the OOD test set are class imbalanced.
Sampling efficiency. During deployment, it can be challenging to collect instances under specific distribution shift. However, existing state-of-the-are methods Yuu et al., 2022] normally require sufficiently large test dataset achieve meaningful results in predicting OOD error. Here, we further validate the sampling efficiency of Dispersion score, compared with ProjNorm.
Figure presents the performance comparison between Dispersion Score and ProjNorm subsets of CIFAR1OC with various sample sizes. The results show that our method can achieve excellent performance even when only 50 examples are available in the OOD data. In contrast, the performance of ProjNorm decreases sharply with the decrease in sample size. The phenomenon shows that Dispersion score is more efficient in exploiting the information of OOD instances.
4.4 Intra-class compactness Vs Inter-class dispersion
In Section 3, we empirically show that feature separability is naturally tied with the final accuracy and propose an ef- fective score based on inter-class dispersion. However, the connection between intra-class compactness and generaliza- tion performance is still mystery. In this analysis, we show that compactness is not good indicator of OOD accuracy. Specifically, we define the compactness score:
cop Enter
Σ
22 12,
S(D) - log
71
where iu, denotes the centroid of the cluster j that the in- stance z; belongs to. Therefore, the compactness score can measure the clusterability the learned features, i.e., the av- erage distance between each instance and its cluster centroid. Intuitively, a high compactness score may correspond to well-separated feature distribution, which leads to high test accuracy. Surprisingly, in Figure 5, we find that the compactness score largely irrelevant to the final OOD error, showing that not an effective indicator for predicting generalization performance under distribution shifts.
Figure 5: Compactness vs. test error CIFAR-1CC with ResNet50.

---

4.5
The importance of the weight
As introduced in Section 3, Dispersion Score can be viewed weighted arithmetic mean of the distance from centers of each class to the center of the whole samples in the feature space, where the weight is the total number of samples in the corresponding class. To verify the importance of the weight in long-tailed setting, we consider a variant that removes the weight:
-(D)=
(p, p3)) ==
=
The results are shown in Table 4, where we compare performances of Dispersion score and the variant without weight respectively under imbalanced CIFAR- 10C and CIFAR- 100C with ResNet10 and ResNet50. From this table, we could observe that the weight enhance the robustness significantly in long-tail conditions.
Table 4: Summary of prediction performance on Imbalanced CIFAR-1OC and CIFAR-100C, The best results are highlighted in bold.
w/o Weights
w/ Weights
Dataset
Network
R²
p
R²
ResNet18
0.675
0,930
0.959
0.982
ResNe150
0.748
0.948
0.968
0.982
CIFAR 10
Average
0.712
0.939
0.978
0.990
ResNet18
0.595
0.838
0.941
0.982
ResNet50
0.395
0.733
0.956
0.982
CIFAR 100
Average
0.494
0.785
0.952
0.986
4.6 K-means vs. Pseudo labels.
While our Dispersion score derived from pseudo labels has demonstrated strong promise, a question arises: can sim- ilar effect be achieved by alternative clustering methods? In this ablation, we show that labels obtained by K-means [Lloyd, 1982, MacQueen, 1967] does achieve compa- rable performance with pscudo labels obtained from the trained classifier. In particular, we allocate instances into clusters by using K-means instead of pseudo labels from the classifier.
1.000
Kmeans
0.975
0.950
0.925
0.900
We present the performance comparison of our method and the variant of K-means in Figure 6. The results show that
0.800
TinylmageNet
Datasets
our Dispersion score performs better than the K-means classes. On
variant and the gap enlarged with the other hand, the variant of K K-means does not require a classifier, i.e., the linear layer in the trained model, which enables evaluate the OOD performance of representation learning methods, e.g., self-supervised learning.
Figure 6: Compare with K-means.
Conclusion
In this paper, we introduce Dispersion score, a simple yet effective indicator for predicting the generalization performance on OOD data without labels. We show that Dispersion score is strongly correlated the OOD eигor and achieves consistently better performance than previous methods under various distribution shifts. Even when the OOD datasets are class imbalanced or have limit number of instances, our method maintains a high prediction performance, which demonstrates the strong flexibility of dispersion score. This method can be easily adopted in practical settings. It is straightforward to implement with trained models with various architectures, and does not require access to the training data. Thus, our method is compatible with large-scale models that are trained on billions of images. We hope that our insights inspire future research to further explore the feature separability for predicting OOD error.
10

---

Acknowledgements
This research is supported by the Ministry of Education, Singapore, under its Academic Research Fund Tier I (RG13/22). Hongxin Wei gratefully acknowledges the support of Center for Computa- tional Science and Engineering at Southern University of Science and Technology for our research. Lei Feng is supported by the National Natural Science Foundation of China (Grant No. 62 62106028), Chongqing Overseas Chinese Entrepreneurship and Innovation Support Program, Chongqing Artifi- cial Intelligence Innovation Center, CAAI-Huawer MindSpore Open Fund, and Openl Community (https://openi..cl.l .ct....ci......c................
References
Shai Ben-David, John Blitzer, Koby Crammer, and Fernando Pereira. Analysis of representations for domain adaptation. Advances in Neural Information Processing Systems, 19, 2006.
Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. IEEE transactions Pattern Analysis and Machine Intelligence, 35(8):1798-188) 1828, 2013.
Mahalanobis Prasanta Chandra et al. On the generalised distance in statistics. In Proceedings of the National Institute of Sciences India, volume 2. pages 49-55, 1936.
Yang Chen, Yu Wang, Yingwei Pan, Ting Yao, Xinmei Tian, and Tao Mei. A style and semantic memory mechanism for domain generalization. Proceedings of the IEEE/CVF International Conference Computer Vision, pages 9164-9175 2021.
Ciprian A Corneanu, Sergio Escalera, and Aleix M Martinez. Computing the testing enror without testing set. In Proceedings of the IEEE/CVF Conference on Computer Vision and Puttern Recognition, pages 2677-2685, 2020.
Weijian Deng and Liang Zheng. Are labels always necessary for classifier accuracy evaluation? In Proceedings of the IEEE/CVF Conference on Computer Vision and Puttern Recognition, pages 15069-15078, 2021.
Weijian Deng. Stephen Gould, and Liang Zheng. What does rotation prediction tell us about classifier accuracy under varying testing environments? In International Conference on Machine Learning, pages 2579-2589 PMLR, 2021.
Pierre A Devijver and Josef Kittler. Pattern recognition: A statistical approach. Prentice hall, 1982.
DC Dowson and BV666017 Landau. The fréchet distance between multivariate normal distributions. Journal of Multivariate Analysis, 12(3):450-455, 1982.
Richard O Duda, Peter E Hart, et al. Paltern classification. John Wiley & Sons, 2006.
Keinosuke Fukunaga. Introduction statistical pattern recognition. Elsevier, 2013.
Yaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. In International Conference on Machine Learning, pages 1180-1189. PMLR, 2015.
Rui Gao and Anton Kleywegt. Distributionally robust stochastic optimization with wasserstein distance. Mathematics of Operations Research. 2022.
Frederick D Garber and Abdelhamid Djouadi. Bounds the bayes classification enror based on pairwise risk functions. IEEE Transactions on Pattern Analysis and Machine Intelligence, 10(2): 281-288, 1988.
Saurabh Garg, Sivaraman Balakrishnan, Zachary C Lipton, Behnam Neyshabur, and Hanie Sedghi. Leveraging unlabeled data to predict out-of-distribution performance. arXiv preprint arX1v:2001.04234, 2022.
Arthur Gretton, Karsten Borgwardt, Malte Rasch, Bernhard Schölkopf, and Alex Smola. A kernel method for the two-sample-prohlem. Advances Neural Information Processing Systems, 19, 2006.

---

Devin Guillory, Vaishaal Shankar, Sayna Ebrahimi, Trevor Darrell, and Ludwig Schmidt. Predicting with confidence on unseen distributions. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 1 1134-1 1344,114, 2021.
Jeff Z HaoChen, Colin Wei, Adrien Gaidon, and Tengyu Ma. Provable guarantees for self-supervised deep learning with spectral contrastive loss. Advances in Neural Information Processing Systems, 34:5000-5011, 2021.
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, pages 770-778, 2016.
Dan Hendrycks and Thomas Dietterich. Benchmarking neural network robustness common corruptions and perturbations. arXiv preprint arXiv: 2019.
Dan Hendrycks and Kevin Gimpel. A baseline for detecting misclassified and out-of-distribttion examples in neural networks. arXiv preprint 16Xiv:1610.0213: 2016.
Weiran Huang, Mingyang Yi, and Xuyang Zhao. Towards the generalization of contrastive self- supervised learning, arXiv preprint arXiv:2111.0074 2021.
Yiding Jiang, Dilip Krishnan, Hossein Mobahi, and Samy Bengio. Predicting the generalization gap in deep networks with margin distributions. In International Conference on Learning Representations, 2019.
Yiding Jiang, Vaishnavh Nagarajan, Christina Back, and Zico Kolter. Assessing generalization of sgd via disagreement. arXiv preprint vrXiv:2106.13799 2021.
Pang Wei Koh, Shiori Sagawa, Henrik Marklund, Sang Michael Xie, Marvin Zhang, Akshay Bal- subramani, Weihua Hu, Michihiro Yasunaga, Richard Lanas Phillips, Irena Gao, et al. Wilds: A benchmark of in-the-wild distribution shifts. In International Conference Machine Learning, pages 5637-5664. PMLR, 2021.
Alex Krizhevsky, Geoffrey Hinton, al. Learning multiple layers of features from tiny images. 2009.
Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial machine learning scale. arXiv preprint arXiv:1611.0122 2016.
Ya Le and Xuan Yang. Tiny imagenet visual recognition challenge. CS 231N, 7(7):3, 2015.
Jacho Lee and Maxim Raginsky. Minimax statistical learning with wasserstein distances. arXiv preprint arXiv: /7050078/5..... 2017.
Da Li, Yongxin Yang, Yi-Zhe Song, and Timothy M Hospedales. Deeper, broader and artier domain generalization. In Proceedings of the IEEE international conference computer vision, pages 5542-5550, 2017.
Ya Li, Xinmei Tian, Mingming Gong, Yajing Liu, Tongliang Liu, Kun Zhang, and Dacheng Tao. Deep domain generalization via conditional invariant adversarial networks. In Proceedings of the European Conference on Computer Vision (ECCV), pages 624 639, 2018
Stuart Lloyd. Least squares quantization in pem. IEEE Transactions on Information Theory, 28(2): 129-137, 1982.
Iyy Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts. arXiv preprint arXiv:1608.0390. 2016.
J MacQueen. Classification and analysis of multivariate observations. In 5th Berkeley Symp. Math. Statist. Probability, pages 281-297, 1967.
Omid Madani, David Pennock, and Gary Flake. Co-validation: Using model disagreement on unlabeled data to validate classification algorithms. Advances in Neural Information Processing Systems, 17, 2004.
12

---

Charles H Martin and Michael W Mahoney. Heavy-tailed universality predicts trends in test accuracies for very large pre-trained deep neural networks. In Proceedings of the 2020 SIAM International Conference on Data Mining, pages 505-513. SIAM, 2020.
Yifei Ming. Yiyou Sun, Ousmane Dia, and Yixuan Li. How exploit hyperspherical embed- dings for out-of-distribution detection. In The Eleventh International Conference on Learning Representations (ICLR), 2023.
Behnam Neyshabur, Srinadh Bhojanapalli, David McAllester, and Nati Srebro. Exploring generaliza- tion in deep learning. Advances Neural Information Processing Systems, 30, 2017.
Sinno Jialin Pan, Ivor W Tsang, James T Kwok, and Qiang Yang. Domain adaptation via transfer component analysis. IEEE Transactions on Neural Networks, 22(2):199-2106 2010.
Emmanouil Platanios, Hoifung Poon, Tom Mitchell, and Eric Horvitz. Estimating accuracy from unlabeled data: A probabilistic logic approach. Advances in Neural Information Processing Systems, 30, 2017.
Emmanouil Antonios Platanios, Avinava Dubey, and Tom Mitchell. Estimating accuracy from unlabeled data: A bayesian approach. In International Conference on Machine Learning, pages 1416-1425. PMLR, 2016.
Joaquin Qainonero-Candele Masashi Sugiyama, Anton Schwaighofer, and Neil D Lawrence. Dataset shift in machine learning. Mit Press, 2008.
Kate Saenko, Brian Kulis, Mario Fritz, and Trevor Darrell. Adapting visual category models to new domains. In European Conference on Computer Vision (ECCV), pages 213-226. Springer, 2010.
Aman Sinha, Hongseok Namkoong, Riccardo Volpi, and John Duchi. Certifying some distributional robustness with principled adversarial training. arXiv preprint 1rXiv:1710.10551, 2017.
Kagan Tumer and Joydeep Ghosh. Bayes error rate estimation using classifier ensembles. Interna- tional Journal of Smart Engineering System Design, 5(2):95-109, 2003.
Eric Tzeng, Judy Hoffmman Ning Zhang, Kate Saenko, and Trevor Darrell. Deep domain confusion: Maximizing for domain invariance. arXiv preprint arXiv: 141..4474 2014.
Eric Tzeng, Judy Hoffman, Kate Saenko, and Trevor Darrell. Adversarial discriminative domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7167-7176, 2017.
Thomas Unterthiner, Daniel Keysers, Sylvain Gelly, Olivier Bousquet, and Ilya Tolstikhin. Predicting neural network accuracy from weights. arXiv preprint arXiv:2002. /448, 2020.
Hemanth Venkateswara, Jose Eusebio, Shayok Chakraborty, and Sethuraman Panchanathan. Deep hashing network for unsupervised domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 5018-5027, 2017.
Zijian Wang, Yadan Luo, Ruihong Qiu, Huang, and Mahsa Baktashmotlagh. Learning to diversify for single domain generalization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 834-843, 2021.
Andrew R Webb and Keith D Copsey, Introduction to statistical pattern recognition. Statistical Pattern Recognition, pages 1-31, 1990.
Hongxin Wei, Renchunzi Xie, Hao Cheng, Lei Feng, Bo An, and Yixuan Li. Mitigating neural network overconfidence with logit normalization. arXiv preprint 2rXiv:2205.09310. 2022.
Scott Yak, Javier Gonzalvo, and Hanna Mazzawi. Towards task and architectur--indeendent generalization gap predictors. arXiv preprint 100iv::990.0055000 2019.
Tzay Y Young and Thomas W Calvert. Classification, estimation, and pattern recognition. Elsevier Publishing Company, 1974.
13

---

Yaodong Yu, Zitong Yang, Alexander Wei, Yi Ma, and Jacob Steinhardt. Predicting out- distribbttion error with the projection norm. arXiv preprint arXiv:2202.05834, 2022.
Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. In BMVC, 2016.
Werner Zellinger. Thomas Grubinger, Edwin Lughofer, Thomas Natschläger, and Susanne Saminger- representation learning. arXiv
Platz. Central moment diserepancy (emd) for preprint arXiv: 2017.
Zhaowei Zhu, Yiwen Song, and Yang Liu. Clusterability as an alternative to anchor points when learning with noisy labels. In International Conference Machine Learning, pages 12912-12923, PMLR, 2021.
Zhaowei Zhu, Zihao Dong. and Yang Liu. Detecting corrupted labels without training model to predict. In International Conference on Machine Learning, pages 27412-27421 PMIR, 2022.
Fuzhen Zhuang, Xiaohu Cheng, Ping Luo, Sinno Jialin Pan, and Qing He. Supervised representa- tion learning: Transfer learning with deep autoencoders. In Twenty-Fourth International Joint Conference on Artificial Intelligence, pages 4119-4125, 2015.
14

---

A
The calculation of Dispersion Score
Our proposed approach, Dispersion Score, can be calculated as shown in Algorithm 1.
Algorithm 1 OOD Error Estimation via Dispersion Score
Input: OOD test dataset D = { a trained model f (feature extractor fg and classifier fw)
Output: The dispersion score
for each OOD instance ž do
Obtain feature representation via E, (a)))) Obtain pseudo labels via 8/ = arg max (z:) end for
Calculate cluster centroids {it 1 using pseudo labels V/K- with jáj 1 E 2, 1(0%- = Calculate the feature center of all instances by jr = m -i=1 2;
my
Calculate Dispersion Score S(D) via Equation (4)
B
Related work
Predicting generalization. Since the generalization capability of deep networks under distribution shifts is a mysterious desideratum, surge of researches pay attention to estimate the generalization capability from two directions.
1) Some works aim to measure generalization gap between training and test accuracy with only training data [Corneanu et al., 2020, Jiang al., 2019, Neyshabur et al., 2017, Unterthiner et al., 2020, Yak et al., 2019, Martin and Mahoney, 2020]. For example, the model-architecture based method [Cornaanu al., 2020] summarizes the persistent topological map of a trained model to formulate its inner-working function, which represents the generalization gap. Margin distribution (Jiang al., 2019] measures the gap by gauging the distance between training examples and the decision boundary. However, those methods are designed for the identical distribution between the training and test dataset, being vulnerable to distribution shift.
2) Some studies try to estimate generalization performance on a specific OOD test dataset without annotation during evaluation. Many of them utilize softmax outputs of the shifted test dataset to form a quantitative indicator of OOD error [Guillory et al., 2021, Jiang et al., 2021, Guillory et al., 2021, Garg et al., 2022]. However, those methods the overconfidence problem [Wei et al., 2022]. Another popular direction considers the negative correlation between distribution difference and model's 's performance in the space of features [Deng and Zheng, 2021] or parameters [Yu et al., 2022]. Nevertheless, common distribution distances practically fail induce stable error estimation under distribution shift [Guillory al., 2021], 1]. and those methods are usually computationally expensive. Unsupervised loss such as agreement among multiple classifiers [Jiang al., 2021, Madani et al., 2004, Platanios et al., 2016, 2017] and data augmentation [Deng et al., 2021] is also employed for OOD error prediction, which requires specific model structures during training. In this work, we focus on exploring the connection between feature separability and generalization performance under distribution shift, which is training-free and does not have extra requirements for datasets and model architectures.
unreliable across diverse distribution shifts due to
Exploring Feature distribution in deep learning. In the literature, feature distribution has been widely studied in domain adaptation [Ben-David et al., 2006, Pan et al., 2010, Zhuang al., 2015, Tzeng et al., 2017], representation learning [Bengio et al., 2013, HaoChen et al., 2021, 1, Ming et al., 2023, Huang et al., 2021], OOD generalization [Li et al., 2018, Chen et al., 2021, Wang et al., 2021], and noisy-label learning [Zhu et al., 2021, 2022]. Domain adaptation methods usually learn a domain- invariant feature representation by narrowing the distribution distance between the two domains with certain criteria, such as maxinum mean discrepancy (MMD) [Pan et al., 2010], 0J. Kullback-Leible (KL) divergence [Zhuang al., 2015], central moment discrepancy (CMD) [Zellinger al., 2017], and Wasserstein distance [Lee and Raginsky, 2017]. InfoNCE [Huang et al., 2021] shows a key factor of contrastive learning that the distance between class centers should be large enough. In learning with noisy labels, it has been shown that the feature clusterability can be used to estimate the transition matrix [7hu et al., 2021]. To the best of our knowledge, we are the first to analyze the connection between feature separability and the final accuracy on OOD data.
15

---

C Sensitivity analysis: pseudo labels
Here, we conduct a sensitivity analysis by using ground-truth labels in our method. Table illustrates that the performance with pseudo labels is comparable with the performance using ground-truth labels. This phenomenon is consistent with the previous method ProjNorm [Yu et al., 2022], shown in Table 8 of their paper. The reason behind this could be that the trained model is capable of identifying certain semantic information from most corrupted examples, thereby retaining their representations in cluster. Thus, the separability of feature clusters can serve an indicator of the final prediction performance for corruption perturbations. Additionally, we provide failure case of feature clusters separability for adversarial perturbations in Appendix F.
Comparison of Dispersion Score with pseudo labels and true labels CIFARIO, CIFAR 100 Table 5:
and ImnyemageNet. The best results are highlighted in bold.
Pseudo labels
True labels
Dataset
Network
R²
R
P
ResNet18
0.968
0.990
0.979
0,989
ResNe150
0.987
0.990
0.985
0.991
CIFAR
WRN-50-2
0.961
0.988
0.945
0.987
Average
0.972
0.990
0.970
0.989
ResNet18
0.952
0.988
0.915
0.989
ResNe150
0.953
0.985
0.959
0.989
CIFAR 100
WRN-50-2
0.980
0.991
0.978
0.995
Average
0.962
0.988
0.950
0.991
ResNet18
0.966
0.986
0.937
0.985
ResNet50
0.977
0,990
0.954
0.995
TinyImageNet
WRN-50-2
0.968
0.986
0.977
0.994
Average
0.970
0.987
0.956
0.991
D More results on class-imbalance settings
This section provides elaborated outcomes of training- -free benchmarks under the setting of class imbalance, serving as a complement to the results presented in Table 3.
Table 6: Summary of prediction performance on Imbalanced CIFAR-1OC and CIFAR-100C for training-free benchmarks, where It2 refers to coefficients of determination, and p refers to Spearman correlation coefficients (higher is better)
Rotation
ConfScore
Entropy
AgreeScore
ATC
Fréchet
Dataset
Network
R²
R²
R²
P
R
R²
ResNet18
0.767 0.922 0,823 0.965 0.841 0.969 0.669 0.922 0,830 0.966 0.966 0.983
ResNe150
0.787
0.946 0.870 0.975 0.887 0.977 0.765 0.953 0.883 0.975
0.916 0.975
CIFAR 10
WRN-50-2
0.829 0.968 0.915 0.986 0.913 0.986 0.823 0.972 0.922 0.986 0.866 0.977
Average
0.794
0.945 0.869 0.976 0.880 0.977 0.752 0.949 0.878 0.976 0.916 0.979
ResNet18
0.769
0.944 0.872 0.988 0.840 0.985 0.858 0.979 0.905 0.988 0.905 0.972
ResNet50
0.847 0.964 0.875 0.986 0.826 0.978 0.832 0.973 0.880 0.986 0.855 0.979
CIFAR 100
WRN-50-2
0.930 0.981 0.976 0.993 0.980 0.993 0.944 0.981 0.981 0.994 0.889 0.988
Average
0.849 0.963 0.908 0.989 0.882 0.985 0.878 0.978 0.922 0.989
0.883 0.980
E Partial OOD error prediction
previous experiments, a common assumption is that the test set contains instances from all classes. To further explore the flexibility of our method on OOD test set, we introduce new setting called partial OOD error prediction, where the label space for the test set a subset of the label space for the training data.
16

---

Here, we train 8 and ResNet50 on both CIFAR- and CIFAR- 100 with 10 and 100 categories, respectively. Different from previous settings, we evaluate the prediction performance on CIFAR-IOC and CIFAR-100C with the first 50% of categories. The numerical results are shown in Tabel 7.
Table 7: Summary of prediction performance partial sets of CIFAR- 10C and CIFAR-100C, where R2 refers to coefficients of determination, and p refers to Spearman correlation coefficients (higher is better). The best results are highlighted in bold.
Rotation
ConfScore
Entropy
AgreeScore
ATC
Frechet
ProjNorm
Ours
Dataset
Network
R
P
R
P
P
P
P
P
R²
P
P
ResNet18 0.578 0.896 0.795 0.982 0.826 0.984 0.615 0.931 0.802 0.981 0.842 0.941 0.770 0,968
0.935
0.985
ResNet50
0.719
0.939 0.885 0.993 0.892 0.993 0.787 0.976 0.887 0.993 0.757 0.953 0.856 0.967 0.950 0.992
CIFAR 10
Average 0.649 0.918 0.841 0.987 0.859 0.989 0.701 0.954 0.845 0.987 0.800 0.947 0.813 0.968
0.942 0.988
ResNet18 0.876 0,946 0,922 0.985 0.902
0.980 0.904
0.971 0,943 0.986 0.894
0,972 0,770 0.968
0.935
0.985
ResNer50 0,923 0,967 0,917 0,980 0.890 0.975 0.915 0.976 0,932 0.983 0.837 0.978 0,856 0.967
0,950
0.992
CIBAR
Average 0,899 0,956 0,920 0.983 0.896 0.978 0.909 0.973 0,938 0,984 0.866 0,975 0.813 0.968 0,942 0.989
From the results, we could observe that our method more robust than existing methods in the setting of partial OOD error prediction. For example. ProjNorm suffers from the incomplete test dataset during the self-training process, with a dramatic drop from around 0.950 to around 0.810 for R of CIFAR-106 and CIFAR- 100C average. Contrastively, method still achieves high accuracy in predicting OOD errors, maintaining an average R² value of 0.950.
Adversarial vs. Corruption robustness.
In previous analysis, we show the superior performance of dispersion score on predicting the accuracy on OOD) test sets with different corruptions. Here, we surprisingly find that feature dispersion can effectively demonstrate the difference between adversarial and corruption robustness.
Table Prediction performance measured by MSE against adversarial attack of different methods. The linear regression model is estimated on CIFAR-1OC, and is used to predict the adversarial examples with perturbation size e varying from 0.25 to 8.0. "True Dispersion" refers to the dispersion score with feature normalization using ground-truth labels. The best results are highlighted in bold.
ConfScore
Entropy
ATC
ProjNorm
Dispersion
True Dispersion
CIFAR-10 0.933
0.892
0.906
0.847
1.359
0.483
Table shows the prediction performance of different methods under adversarial attacks. "True Dispersion" refers to the dispersion score with feature normalization using ground-truth labels. In particular, we generate adversarial samples attacked by projected gradient descent (PGD) using untargeted attack [Kurakin et al., 2016] on the test set of CIFAR- 10 with 10 steps and perturbation size e ranging from 0.25 to 8.0. While the vanilla Dispersion score leads to poor performance, we note that the variant of Dispersion score with ground-truth labels performs much better than previous methods. This phenomenon different from the conclusion the sensitivity analysis of pseudo labels in predicting corruption robustness (See Appendix C), where the variant of true labels cannot outperform our method.
To understand the reasons behind the performance disparity of feature dispersion between adversarial and corruption robustness, we present the i-SNE visualization of features for adversarial attack of CIFAR-10 10 test set with various perturbation sizes in Figure 7. Compared to Figure 3, the results indi- cate that adversarial perturbations increase the distance between different clusters, whereas corruption perturbations decrease the separability of the clusters. In other words, adversarial perturbations decrease the test accuracy different way: assigning instances to the wrong groups and enlarging the distance among those groups Therefore, feature dispersion using pseudo labels cannot be an effective method in the adversarial setting. We hope this insight can inspire specific designed methods based on feature dispersion for predicting adversarial errors in the future.
17

---

(a) =00. ||
pseudo
(b) c2.0 pseudo
(c) c=0.0
||
pseudo
(d) c=8. true
Figure 7: t-SNE visualization of feature representation on adversarial attack of CIFAR-10 set with perturbation size ranging from 0.25 to 8.0.
G Performance on realistic datasets
To verify the effectiveness of Dispersion Score realistic datasets, conduct experiments PACS [Li et al., 2017]. Office-31 [Saenko et al., 2010] and Office-Home [Venkateswara et al., 2017] with ResNet-18, ResNet-50 and WRN-50-2 using normalization. Table is the numerical results, from which we can observe that our method outperforms the other baselines on datasets with natural shifts.
Table 9; Performance comparison of all approaches on PACS, Office-31 1 and Office-Home, where I² refers to coefficients determination, and o refers to Spearman correlation coefficients (higher is better). The best results are highlighted in bold.
Rotation
ConfScore
Entropy
AgreeScore
ATC
Fréchet
ProjNorm
Dispersion
Dataset
Network
P
P
R²
P
P
ResNet18
ReaNe150
0,861
0.923
0.071
0.070 0.062
0.056
0.463
0.622
0.192
0.266
0.463
0.622
0.245
0.587
0.827
0.867
PACS
WRN-50-2
0.805
0.902
0.646
0.678
0.629
0.671
0.377
0.858
0.753
0.832
0.558
0.832
0.475
0.650
0.896 0.937
Average
0.850
0.907
0.501
0.438
0.494
0.488
0.771 0.486
0.583
0.753
0.294
0.552
0.855
ResNei18
0.943
ResNet50
0.371
0.829
0.486
0.829
0.355
0.829
0.012
0.464
0.533
0.486
0.035
0.257
0.241
0.429
0,878
0.943
Office-31
WRN-50-2
0.578
0.600
0.525
0.714
0.425
0.714
0.003
0.257
0.405
0.943
0.035
0.143
0.147
0,143
0.798
0.829
Average
0.567
0.790
0.936
0:494
0.790
0.367
0.752
0.006
0.269
0.594
0.790
0.219
0.162
0.333
0,836 0.905
ResNet18
ResNe150
0,851 0.944
0.770
0.895
0.742
0.853
0.027
0.217
0.487
0.734
0.607
0.685
0.169
0,476
0.841
0.860
Office Home
WRNI-50-2
0.823 0.958 0,742
0.874
0.696
0.846
0.132
0.406
0,384
0.643
0.589
0.706
0.173
0,531
0.897 0.937
Average
0.832 0.944
0.893
0.734
0.860
0.071
0.256
0.664
0.601
0.716
0.135
0.869
18


Reviews:
[{"review_id": "zSdQc3jT1h", "reviewer": "Reviewer_1A8L", "summary": "This work aims to predict classifier accuracy on unlabeled test samples. To achieve this goal, this paper proposes a feature separability-based dataset-level score to check whether features have high inter-class scatter. This feature separability score is calculated by measuring how far the centroids of features that share the same pseudo-label predicted by the model deviate from the center of all features on average. The experiments show that such inter-class dispersion is strongly correlated with model accuracy.", "questions": "- Why using the gound-truth label to define class clusters does not give stronger correlation strength (Section D).\n- Under an adversarial attack, the features might still have high dispersion but the classifier archives low accuracy. Please comment on this and discuss the potential solution to alleviate this. \n- Class imbalance results (Table 3) are not sufficient. How about other existing methods (e.g., DoC and ATC) under such class imbalance?", "limitations": "This work reports results for some special cases, such as class imbalance and adversarial attacks. Another potential limitation is the open set problem, where some unseen classes arise. Also, some classes may be missing during testing. It would be better to mention and discuss both cases, as the proposed scatter score can be significantly affected.\n\n***[Post-rebuttal]*** \n\n> I would recommend excluding the open-set results from the main paper due to the evaluation metric's limitation in assessing only the seen classes. Moreover, ATC reports the results on some real-world and large-scale datasets like iWILDS and ImageNet, including such datasets would make the submission solid. This addition would enhance the robustness of your research and highlight its practical applicability. Given that you've already showcased results on domain adaptation datasets such as PACS, Office-31, and Office-Home, I am inclined to think that the current evaluation is sufficient.\n\n> [Additional suggestions which do not impact the rating of this paper] You might consider referring to two relevant works: \"Unsupervised Accuracy Estimation of Deep Visual Models using Domain-Adaptive Adversarial Perturbation without Source Samples,\" which also features results on domain adaptation datasets, and \"Characterizing Out-of-Distribution Error via Optimal Transport.\" This latter work, which assumes a consistent marginal label distribution between training and test sets, stands in contrast to your method and may help highlight the merits of your approach.", "rating": 5, "confidence": 5, "soundness": 2, "presentation": 2, "contribution": 2, "strengths": "+ [***Good clarity***] This work is well-written and easy to follow. The method is well presented, the visualizations are helpful, and the experimental settings are clearly introduced. \n\n+ [***Measuring feature separability is well-motived***] Under distribution shifts, the features of the source and target can be scattered differently. Using such information to reflect model accuracy seems reasonable.", "weaknesses": "- [***More results to illustrate the relationship between distribution gap and accuracy***] In the accuracy prediction, there are two metrics are proposed to measure the distribution gap. Please show their results in Figure 1 to well illustrate the motivation regarding the potential limitation of the distribution gap for accuracy estimation. \n\n- [***The definition of dispersion score is not sound***] The class cluster is based on the classifier's prediction. What if the classifier gives bias predictions on test sets? For example, in adversarial examples, the classifier maintains class-class separability but totally misclassified data. Moreover, why using the gound-truth label to define class clusters does not give stronger correlation strength (Section D).\n\n    Moreover, whether the proposed method can handle the cases where some classes do not appear or some unseen classes appear. For example, ProjNorm discusses the label shift where some classes are missing. Under such a scenario, ProjNorm is less effective than other methods. \n\n- [***The experimental setting is somewhat limited***] This work only provides the experiments on small-scale datasets (e.g., CIFAR-10/100 and TinyImageNet). Considering the literature, the results on iWILDS and ImageNet should be included. For example, DoC and ATC report the results on ImageNet datasets with several natural distributions, such as ImageNet-V2, ImageNet-R and ObjectNet. Without the results on such realistic datasets, it is hard to conclude the robustness and effectiveness of the proposed method.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Great thanks for your constructive comments and suggestions! Please find our response below.\n\n1. **Improving Figure 1 by adding the two matrics.**\n\nThank you for the suggestion. In the final version, we will add the corresponding metrics (shown in table 1) on the figures. We list the numerical details below for your reference.\n\n|  $Method$ | $Fr\\acute{e}chet$ | $MMD$ |\n| ---- | ---- | --- |\n| $R^2$ | 0.858 | 0.804 |\n| $\\rho$ | 0.964 | 0.943 |\n\n\n2. **Can Dispersion Score work under adversarial attacks?**\n\nIn this paper, our method is designed for predicting the test accuracy on OOD data, which is generally produced by natural corruption or perturbation. As an extension, we discussed the adversarial setting in Appendix H. The results show that those methods of OOD error estimation cannot provide meaningful performance under adversarial attacks, as well as our method. This is consistent with the observation described in ProjNorm, where their method predicts an error of 28.1% when the true error is 100.0%. \n\nFurthermore, we find that feature dispersion may provide an intuitive understanding of the inherent difference between adversarial and (natural) corruption robustness. As shown in Figure 7, adversarial perturbations surprisingly increase the distance between different clusters, while corruption perturbations decrease the separability of the clusters. The results reveal that adversarial perturbations affect the model predictions in a different way: assigning instances to the wrong groups and enlarging the distance among those groups. This explains why dispersion score cannot be applied to predict the performance on adversarial examples. While the limitation on adversarial examples persists (like ProjNorm), we hope the above insight can inspire specific designed methods for predicting adversarial errors in the future.\n\n3. **The performance of Dispersion Score in parial OOD error prediction.**\n\nIn Appendix G, we provide an analysis for the parial setting, where the label space of the test dataset is only a subset of that of the training dataset. In Table 7, we can observe that our method achives better performance than existing methods when some classes disappear during testing.\n\n4. **The performance of Dispersion Score when the test set includes unseen classes.**\n\nMany thanks for your constructive suggestions. We conduct this experiment by injecting 10% extra examples from unseen classes with pretrained ResNet18. We use Tiny-ImageNet and CIFAR-10 as the ID datasets, while 300K Random_Images and CIFAR100 as the datasets with unseen classes. The results are presented in Table 2 (see the attached pdf), which shows that our method outperforms previous methods.\n\n5. **Why using the true labels cannot outperform our method with pesudo labels?**\n\nIt is because Dispersion score with ground-truth labels only measures the quality of the learned features, regardless of the last linear layer. In an extreme case with a perfect feature extractor, the accuracy might be low due to the poor linear classifier, even though Dispersion score with ground-truth labels is very high. Using pesudo labels, Dispersion score involves in the bias of the linear classifier, thereby showing better performance in predicting OOD errors. We may provide a formal analysis to show the advantages of pesuado labels in Dispersion score in the final version or future work.\n\n6. **More results on datasets with several natural distributions.**\n\nTo illustrate the effectiveness of Dispersion Score under realistic datasets, we evaluate the estimation performance via MSE on ImageNet-R with WRN-50-2. Their results are shown below.\n\n|MSE|Entropy|ATC|Frechet|ProjNorm|Dispersion|\n| - |- |- |- |- |- |\n|ImageNet-R|27.67|13.27|11.31|7.23|$\\textbf{4.46}$|\n\nIn addition, we also evaluate our method under datasets with more complex distribution shift, such as PACS, Office-31 and Office-Home, which results are shown in Table 1 (see the attached pdf). We can observe from those tables that Dispersion Score obtain better and more stable performance compared with other compared baselines, while the state-of-the-art method, ProjNorm, almost fail in these cases.\n\n7. **The results of other compared methods in the imbalanced setting.**\n\nWe show the results of other compared methods in Appendix F. In Table 6, we illustrate the performance of the rest methods including Rotation, Entropy, ConfScore, AgreeScore, ATC and $Fr\\acute{e}chet$ under the imbalanced setting. The results show that our method outperforms those compared methods by a meaningful margin.\n\n"}, {"review_id": "GN8avZgnSZ", "reviewer": "Reviewer_HxyT", "summary": "This research focuses on predicting test accuracy on shifted datasets without access to ground-truth labels. The authors begin by analyzing the potential issue of the existing methods which were based on the shift distance and point out that the previous distributional distances were not always correlated highly to the out-of-distribution (OOD) error. Then, they proceed with an intuitive example and theoretical explanation, showing the connection between feature separability and test accuracy. Based on this, they propose a novel metric that measures the inter-class dispersion, which is demonstrated as an effective factor for the OOD error estimation. They conducted experiments on CIFAR-C and TinyImageNet-C to validate the advantages of the proposed method. The authors further demonstrate the robustness of the proposed method against class imbalance and data shortage.", "questions": "- I noticed that when computing the dispersion score, the pseudo labels were used to determine the cluster centroid. In Appendix E, the author compared the pseudo-labeling with another clustering method, K-means. However, I am interested in if it can be further improved by improving the quality of these pseudo labels. For example, filtering out some low-confidence predictions, adopting soft pseudo labels instead of hard ones, or considering wrong pseudo labels as noisy annotations? \n- I also noticed that the previous work, ProjNorm, also adopted pseudo labels for the OOD error prediction. Could you please summarize the differences in how to adopt the pseudo labels between the two methods?\n- About the evaluation times of Dispersion score on TinyImageNet (Table 2). The time of ResNet50 should be longer than that of ResNet18. Is there a typo that records the times in the wrong order?\n- From the analysis in 4.4, does it mean that we can focus more on the inter-class dispersion instead of intra-class compactness in representation learning? \n- Some potential typos:\n    - Line 221, Spearson -> Pearson?\n    - Line 240, Table 6 -> Table 1?", "limitations": "I did not see any severe limitations in this paper.", "rating": 7, "confidence": 4, "soundness": 4, "presentation": 4, "contribution": 3, "strengths": "1. The task studied in this paper is practically important. In some real-world applications, it is necessary to assess the model performance on a given unlabelled dataset. Under those scenarios, OOD error estimation becomes inevitable and valuable.\n2. The proposed method is supported by both empirical observations and theoretical analysis. The motivation is clear.\n3. The proposed method is novel, effective, and efficient. Previous SOTA methods like ProjNorm need to update the model which is computationally expensive (It can be unachievable with some large models). They also show that intra-class compactness cannot work well, which motivates deeper exploitation of the properties within the features distribution rather than the coarse-grained property on the whole dataset adopted in AutoEval.\n4. It is also interesting to see that this paper further investigated the performance under some scenarios with imperfect data, e.g., class imbalance, smaller sample size, and partial OOD error prediction. To the best of my knowledge, this is the first work providing such a complete analysis. Compared with the previous studies, the proposed approach achieved comparable performance even under these extreme cases.\n5. This paper is well-written and easy-to-understand. The analysis and figures provided by the authors are clear and informative. I believe readers can easily get the core idea and implement it.", "weaknesses": "1. Some potential typos should be corrected in the next version. See the Questions part for more details.\n2. The discussion about the pseudo labels used for cluster centroid determination can be further extended. See Questions for more details.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "1. **Can improving the quality of pseudo labels further enhance performance of OOD error estimation?**\n\nTo verify whether improving quality of pseudo labels can further improve the estimation performance, we conduct experiments on Tiny-ImageNet with ResNet18 by filtering out low-confidence predictions under a certain threshold. From the results below, we can observe that selecting high-confidence samples even degrades the estimation performance. Furthermore, we present in Appendix D that using ground-truth labels cannot improve the estimation performance, showing that improving label quality may not be a correct direction. As we discussed in the response to the reviewer 1A8L, pseudo labels in our method is used to introduce the bias of the linear layer, so a potential direction might be using the softmax output, instead of the one-hot pseudo labels.\n\n\n|Threshold|0.0|0.05|0.1|0.2|0.3|0.4|0.5|0.6|0.7|0.8|0.9|\n| --- | - | - | - | - | - | - | - | - | - | - | - |\n||0.966|0.965|0.966|0.945|0.917|0.886|0.875|0.847|0.821|0.798|0.786|\n\n\n\n2. **The difference between Dispersion and ProjNorm in adopting pseudo labels.**\n\nThank you for the great question. Yes, both our Dispersion Score and ProjNorm adopt pseudo labels during OOD error estimation, but we note that the role of the pseudo labels in these two methods are somewhat different. In ProjNorm, they use pseudo labels in a \"self-training\" manner, which is commonly used in semi-supervised learning. As the number of mislabeled out-of-distribution (OOD) examples increases, the training deviation of parameters tends to expand further. In this way, the distance in parameter space can be used to measure the test accuracy. In our method, pseudo labels is used to introduce the bias of the linear layer, which also affects the final predictions. If we simply use the true labels, Dispersion score can only measure the quality of the learned representations, instead of the final accuracy. \n\n3.  **Do we need to pay more attention on inter-class dispersion than intra-class compactness in representation learning?**\n\nIn this work, our findings indicate that there is no significant linear correlation between intra-class compactness and test accuracy on out-of-distribution datasets. However, there might be some other forms of relationship between them, e.g., nonlinear correlation. Therefore, it may needs more analyses to explore the specific effects of intra-class compactness in representation learning， which we believe can benefit from the insight from this work.\n\n\n4. **Some typos**\n\nMany thanks for your suggestions. We will fix those typos in the revised version."}, {"review_id": "DxfoDa6yTM", "reviewer": "Reviewer_BweV", "summary": "In this paper, the authors focus on the task of predicting model performance on unseen/shifted datasets, without support of annotations. To do so, they first show the connection between feature separability and test accuracy, with an intuitive example and theoretical explanation. Based on the analysis, they propose a novel metric, Dispersion score, which measures the inter-class divergence from feature representations. They also reveal that intra-class compactness does not reflect the generalization performance, while inter-class dispersion works as a good indicator. They conduct experiments on CIFAR-C and TinyImageNet-C datasets to show the efficiency and effectiveness of the proposed metric. Furthermore, they also show the advantages of their method in some extreme cases (limited data, partial label set, class imbalance).", "questions": "see weaknesses.", "limitations": "The authors discussed the limitations of the proposed score in the adversarial setting, where the feature quality is also broken by adversarial attacks. The authors also provide analysis to show the underlying reason, which is also an interesting contribution. ", "rating": 8, "confidence": 5, "soundness": 4, "presentation": 3, "contribution": 4, "strengths": "1.The motivation of this work is reasonable. Intuitively, the prediction performance should be tightly tied with the quality of the learned feature. High inter-class dispersion is one of the goals of self-supervised learning for learning a good representation. The authors also provide an interesting explanation from a theoretical perspective, which is one of the highlights of this work.\n\n2.The analysis of those methods with distribution distance is thought-provoking. In my view, the shifted distance might not be necessarily connected to the test performance, as the shifted features might not be important for the final prediction. For example, an image classifier with sufficient generalization ability would not change its predictions when the background is changed a lot.\n\n3.The proposed method is novel and interesting. To the best of my knowledge, this is the first work to exploit the feature properties of test instances for predicting OOD error. It does not require access to the training data and only uses a forward propagation, which is much faster than existing SOTA methods.\n\n4.The empirical results are extensive and convincing. The authors not only show the simple method outperforms existing training-free methods, but also compare to ProjNorm on the computational efficiency (575 second v.s. 11 second). The most exciting part for me is the analysis on the flexibility in OOD data, which considers some real-world settings, like class imbalance and limited data. The authors also present that a high intra-class compactness is not necessary for good prediction performance, which may provide a new insight for representation learning. ", "weaknesses": "1.The presentation of some Figures can be improved. For example, in Figure 1b, the magnified box seems not match the original area. The four images of Figure 2 are a little small, which might be improved by reducing the blanks between images.\n\n2.Why intra-class compactness does not work is not clear. Although the authors show that intra-class compactness is not an effective indicator empirically, it could be better if the authors can provide an intuitive explanation.\n", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "1. **Improving quality of some figures.**\n\nThanks for your constructive suggestions. We will improve the quality of those figures in the revised version, as you suggested.\n\n2. **The reason why intra-class compactness dose not work.**\n\nThank you for the thought-provoking question. Previous works in representation learning demonstrate that high intra-class compactness and inter-class separability are correlated to the final accuracy in machine learning. In this paper, we show that intra-class compactness cannot be used to indicate the prediction performance under distribution shift, while inter-class separability still works. The potential reason of the difference is from the effects of convariate shifts. The convariate shift may have a significant influence on the intra-class compactness so that compactness cannot effectively reflect the final accuracy. We will explore this hypothesis in our future work.\n"}, {"review_id": "ydpH1kJTyn", "reviewer": "Reviewer_ALm9", "summary": "This paper proposes an easy-to-use dataset-level method for predicting OOD scores. The authors analyze two desiderata in representation learning: high inter-class dispersion and high intra-class compactness. Through some experiments on CIFAR and TinyImageNet, the authors reveal that the inter-class dispersion is strongly correlated with the OOD performance while intra-class compactness does not really correlate with the OOD accuracy.  ", "questions": "Please see weaknesses and limitations. ", "limitations": "My main concern is still the simple experiment setting. In my opinion, it would make the proposed method useful only if the OOD benchmark is replaced with real-world ones. I suggest the authors verify the proposed approach in standard CIFAR and ImageNet-1k benchmarks as done in [1,2,3].  Of course, it is not necessary to plot the curve of accuracy versus distance as done in Figure 1 and Figure 3 (a single correlation value would be sufficient), but it would be important to show the method of predicting OOD error is useful in practice especially given that the method does not rely on the class distribution. \n\n[1] React: Out-of-distribution detection with rectified activations. NeurIPS21\n\n[2] On the importance of gradients for detecting distributional shifts in the wild, NeurIPS21\n\n[3] RankFeat: Rank-1 Feature Removal for Out-of-distribution Detection. NeurIPS22", "rating": 6, "confidence": 4, "soundness": 2, "presentation": 2, "contribution": 2, "strengths": "1. The proposed method is well-motivated and explained. The authors first claim that MMD and Fr\\'echet distance is not good surrogates for  OOD error prediction and suggest using dispersion score instead. Figure 3 indicates that the dispersion score is indeed better than conventionally used distance.\n\n2. The proposed method is easy-of-use and training-free. It is also flexible to different OOD data in sample size and class distributions.\n\n3. The method outperforms previous approaches in most benchmarks. ", "weaknesses": "1. The experiments are all conducted in elementary and simple experiments settings, i.e., the OOD dataset is set to be some augmentation and corruptions applied on the ID set. This is not really the real-world OOD benchmark setting as the corrupted OOD dataset still has some class-overlapping information with the ID set. Can it apply to the standard OOD benchmark in CIFAR and ImageNet? For example, the authors could use ImageNet-1k as ID and iNaturalist, Places, Textures, and SUN as OOD. With the current experimental setting with simple data augmentation, it is really hard to judge whether the method can be useful for real-world usage.\n\n2. It would be much more interesting to have non-overlapping ID and OOD dataset in experiments. For example, the authors can train model on CIFAR100 and use CIFAR10C as OOD or vice verse (CIFAR10 as ID and CIFAR100 as OOD). It also meets more real-world setting as CIFAR10/CIFAR100 is a commonly used OOD benchmark.\n\n3. Though the intra-class compactness alone is not useful. Would it be better if the intra-class compactness is combined with the dispersion? Would it be an interesting ablation study?\n", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "1. **About the OOD setting in the experiments**\n\nThank you for pointing out the potential for misunderstanding. We would like to clarify that there are different definitions of \"OOD\" in various related areas. In OOD detection, OOD examples are those test samples with different label space from the training set (semantic shift). In OOD generalization [1] and OOD error estimation, we use \"OOD\" to describe examples with covariant shifts or concept shifts, where their ground-truth labels are included in the label set. The difference between these two settings lies in **whether the label space is shared between the training and test data**. Therefore, it is common practice to use different \"OOD\" test sets in OOD detection and OOD error estimation. To avoid potential misunderstandings, we will clearly describe the OOD setting in the problem statement (Subsection 2.1) of the final version.\n\nMoreover, it is meaningless to calculate the accuracy in an OOD test set with semantic shifts, where the ground-truth labels of all instances are out of the label space. To demonstrate the robustness of Dispersion score in complex settings, we conduct experiments on a more realistic setting, where parts of test samples are with semantic shifts and others are with covariant/concept shifts. The goal is to estimate the performance on those examples with covariant/concept shifts. We show the results in the Table 2 (see the attached pdf).\n\nSpecifically, we inject 10% extra examples from unseen classes (drawn from [300K Random Images](https://github.com/hendrycks/outlier-exposure) and CIFAR-100) on ResNet18. This table shows that our method outperforms all training-free benchmarks, and is comparable with training method, ProjNorm (using ).\n\nIn addition, to demonstrate effectiveness of Dispersion Score under natural distribution shifts, we also conduct experiments on some domain-adaptation/ domain-generalizaition datasets, such as PACS, Office-31 and Office-Home. The results in the Table 1 (see the attached pdf) show that our method outperforms the compared methods in these settings with a large margin, which confirms the advantage of our method.\n\n2. **Can the combination of intra-class compactness and Dispersion Score performs better than only Dispersion Score?**\n\nThank you for the suggestion. In the Table 3 (see the attacked pdf), we show that combining dispersion with compactness cannot outperform using Dispersion Score only.\n\n[1] Shen, Z., Liu, J., He, Y., Zhang, X., Xu, R., Yu, H., & Cui, P. (2021). Towards Out-Of-Distribution Generalization: A Survey. ArXiv, abs/2108.13624."}]

Author rebuttal:
## General Response

We thank all the reviewers for their time, patient, and valuable comments. We are glad that all reviewers agree that our work is *well-motivated and well-organized, clear, and concise*. Reviewers HxyT, BweV, and ALm9 appreciate that *the experimental results are strong and convincing*. We are also encouraged that reviewers find this method is *novel, comprehensively analyzed (BweV, HxyT), and easy-to-use (Alm9)*. 

We respond to each reviewer's comments in details, respectively. And we put three tables in the attached pdf file, which support our claims in the responses. In the revised version, we will also update the manustript according to reviewers' suggestions, and we believe this makes our paper much stronger. 

Meta-review: All reviewers voted to accept the paper, citing the importance of the problem being tackled, the empirical and analytical analysis, and clarity of writing.
Decision: Accept (poster)