GradOrth: A Simple yet Efficient Out-of-Distribution Detection with Orthogonal Projection of Gradients
Authors: Sima Behpour
Thang Doan
Xin Li
Wenbin He
Liang Gou
Liu Ren
Venue: NeurIPS 2023 poster (2023)
Keywords: out-of-distribution detection
OOD
uncertainty estimation
gradient projection

Abstract: Detecting out-of-distribution (OOD) data is crucial for ensuring the safe deployment of machine learning models in real-world applications. However, existing OOD detection approaches primarily rely on the feature maps or the full gradient space information to derive OOD scores neglecting the role of \textbf{most important parameters} of the pre-trained network over In-Distribution data. In this study, we propose a novel approach called GradOrth to facilitate OOD detection based on one intriguing observation that the important features to identify OOD data lie in the lower-rank subspace of in-distribution (ID) data.
In particular, we identify OOD data by computing the norm of gradient projection on \textit{the subspaces considered \textbf{important} for the in-distribution data}. A large orthogonal projection value (i.e. a small projection value) indicates the sample as OOD as it captures a weak correlation of the in-distribution (ID) data. This simple yet effective method exhibits outstanding performance, showcasing a notable reduction in the average false positive rate at a 95\% true positive rate (FPR95) of up to 8\% when compared to the current state-of-the-art methods.

GradOrth: A Simple yet Efficient Out-of-Distribution Detection with Orthogonal Projection of Gradients
Sima Behpour
Thang Doan
Xin Li
Wenbin He
Liang Gou
Liu Ren
Bosch Research North America, Bosch Center for Artificial Intelligence (BCAI) (sima.behpour, thang.doan, xin.li9, wenbin.he2, liang-gou, liu.ren @us.bosch.com
Abstract
Detecting citto--distribution (OOD) data is crucial for ensuring the safe deploy- ment of machine learning models in real-world applications. However, existing OOD detection approaches primarily rely on the feature maps or the full gradient space information to derive OOD scores neglecting the role of most important parameters of the pre- pre-trained network over in-distribution (ID) data. In this study, propose novel approach called GradOrth to facilitate OOD detection based on one intriguing observation that the important features to identify OOD data lie in the lower-rank subspace of ID data. In particular, we identify OOD data by computing the norm of gradient projection on the subspaces considered important for the in-distribution data. A large orthogonal projection value (i.e., small projection value) indicates the sample as OOD as it captures weak correlation of the ID data. This simple yet effective method exhibits outstanding performance, showcasing a notable reduction in the average false positive rate at a 95% true positive rate (FPR95) up to 8% when compared the current state-of-the--u methods.
1 Introduction
The issue of identifying out-of- ditsrritbbbtionn (OOD) data, which falls outside training data distributions, has become a significant focus in deep learning. OOD data challenges real-world model deployment, as it can lead to unreliable or incorrect predictions, particularly in safety- crritic--riicllll applications such as healthcare, autonomous vehicles, and physical sciences [14 [55 64
This problem arises because modern Deep Neural Networks (DNNs)) produce overconfident predictions on OOD inputs,
4
2).
41 The main goal of OOD detection is to develop methods that can accurately detect when a model encounters OOD data, allowing the model to either reject these inputs or provide more informative responses, such as uncertainty indication or confidence measures.
complicating the separation of in-distribution (ID) and OOD data 63
Many studies have investigated approaches detecting OOD in deep learning 5
38 39]. The majority of prior work focused on calculating OOD uncertainty from the 32 34
or feature representations [29]. Another line of studies like ODIN [2), GradNorm 23 and ExGrad [24] leverage the gradient information of deep neural network models to compute OOD uncertainty score and achieve performant results. GradNorm (3 investigates the richness of the gradient space and presents that gradients provide valuable information for OOD detection. In particular, GradNorm utilizes the vector norm of gradients explicitly an OOD scoring function. GradNorm, however, considers the full gradient space information, which might be noisy and lead to sub-optimal solutions.
activation space of a neural network, for example. by using model output [18 27
32
A recent direction of research employs network parameter sparsification to improve OOD detection performance like DICE 47 and ASH [2]. ASH removes majority of the activation by obtaining the pth- percentiee of the entire representation. However, the potential consequence may result in
37th Conference on Neural Information Processing Systems (NcurIPS 2023).

---

diminished performance due to the partial removal of critical parameters within the pre-trained network. Also, this is an empirical approach without principled way sparsify models.
Based on key observations presented in gradient-based and spareification-be bassdd OOD detection methods, an intriguing insight emerges: the crucial discriminative features for OOD data identification reside within the gradient subspace of the ID data. This suggests that by focusing on the gradient information in the subspace of the ID data, which captures the most salient information, we can enhance the accuracy and reliability of OOD data detection algorithms. However, it takes non-trivial work to identify such an efficient gradient subspace.
Inspired by recent low-rank factorization research for DNNs [59] 52 20 51], indicating the intrinsic model information resides in few low-rank dimensions, introduce novel approach named GradOrth. More specifically, the proposed method, GradOrth, distinguishes OOD samples by employing orthogonal gradient projection in the low-rank subspaces of IDD data (figure I. These II) subspaces (54 in figure 1 are derived through singular value decomposition (SVD) of pre-trained network activations, specifically GradOrth effectively computes and identifies the relevant subspaces associated with the ID data, enabling accurate discrimination of OOD samples through orthogonal gradient projection. A large magnitude (figure (aa) of orthogonal projection (i.e., small projection) serves as a significant criterion for classifying sample as OOD since captures weak correlation with the ID data.
small subset of randomly selected ID data. By leveraging SVD,
Our key results and contributions are:
We present GradOrth, novel and efficient method for out-of-distribution (OOD) detection. Our approach leverages the most important pa- rameter space of a pre-trained network and its gradients to accomplish this task. To the best of our knowledge, GradOrth is the pioneering en- deavor to investigate and showcase the efficacy of the subspace of a DNN's gradients in OOD detection.
Subspace layer of pre trained network on sampled In-O data
S
Gradient for testing sample x : 200)
(A) 000 data
Projection gracient over subepace 5 00x)
Orthogonsl projection gradient
(b)
We evaluate the performance of GradOrth on widely-used benchmarks, and it demonstrates competitive results compared other post-hoc OOD detection baselines. Notably, GradOrth outperforms the strong baseline methods by con- sistently reducing the false positive rate at the 95th percentile (FPR95) by a margin ranging from 2.71% to 8.05%. Moreover, ments highlight that GradOrth effectively enhances OOD detection capabilities while maintaining high accuracy in classifying in-distribution (ID) data.
Figure The main
GradOrth: Measuring orthogonal pro-
jection of the gradicat of testing sample onto k-dimension (o.g k=2 here) subspace of pre-tmained network on ID data, by the angle a be- tween g(m;) V C(0%) and O(z,) P (V ((OF))) If large small projection subspace S*1,, shown in (a), the sample at, is weakly correlated to ID data, and therefore is recogizzed Otherwise, data, shown (b).
experi-
We present a comprehensive analysis, including ablation experiments and theoretical investigation, aimed at enhancing the understanding of our proposed method for OOD detection. Through these rigorous analyses, we aim to provide valuable insights and improve the overall comprehension the intricacies and effectiveness of our OOD detection approach.
2 Background and Our Notations
We consider a neural network with L layers and a set of learning parameters 0 = (0' where ø present the learning parameters of layer l. x² denotes the representation of input x, at layer / in the successive layers given the data input z;. The network performs the following computation each
layer:
x - (f(''xx))) 1-
(I)
where, (.) is non-linear function and f....) is a linear function. We leverage matrix notation for input (X;) convolutional layers and vector notation for input (xx) in fully connected layers. In the first layer, x x; refers to the raw input data. It is noteworthy to mention that our approach holds applicability across all layers of the network. However, our experimental investigations reveal that the last layer yields the most optimal performance, please refer to appendix, section B for our

---

empirical studies report. This preference is advantageous as it alleviates significant time complexity arising from gradient computations across multiple network layers.
2.1
Input and Gradient Space
Our algorithm capitalizes on the intrinsic property of stochastic gradient descent (SGD) updates lying within the span of input data points, as validated by [62] 20 60). The subsequent subsections present this relationship. specifically in fully connected layers. We present the details regarding convolutional layers in the appendix, section A
Fully Connected Layer Consider single-layer linear neural network in supervised learning setup where each (input, label) training data pair is driven from a training dataset, DD. We use æ E R" to present the input vector, y E IRm to present the label vector in the dataset, and O E mm to express the learning parameters (weights) of the network. In general, the network is trained by minimizing a loss function (e.g, mean-square error) as follows:
L 2 Ox y
(2)
Following stochastic gradient optimization, we can present the gradient of this loss with respect to weights as:
voL= y)u" -zx""
(3)
Here, 52 E 1n denotes the eтror vector. Consequently, the gradient update will reside within the input span (æ), wherein the elements in 22 exhibit varying magnitudes, thus influencing the scaling of a accordingly, please refer to section B for the proof. For simplicity, we have considered per-example loss (batch size of 1) and mean-squared loss function here. Furthermore, is important to mention that the aforementioned relationship remains applicable even in the context of the mini-batch setting or when utilizing alternative loss functions such as cross-entropy loss, where the calculation of Ω may differ. For more comprehensive information on this subject, please consult the appendix, specifically section The apputggradient relationship equation 3 can be applied to any fully connected layer of neural network where æ is the input to that layer and Ω is the error coming from the next layer. In addition, this equation also applies to the networks with non-linear units (such as ReL.U) and cross-entropy losses, though S2 will be calculated differently.
2.2 Matrix Approximation with SVD:
In our algorithm, we utilize singular value decomposition (SVD) for matrix factorization. Specifically, rectangular matrix R UEV* E " can be factorized using SVD into the product of three matrices. Here, Σ represents a matrix containing the singular values sorted along its main diagonal, while U Rmxm and V E R denote orthogonal matrices [10]. In the case where the rank of the matrix R r (r S min(m, (m, n)). the matrix R can be represented as R = Et "uu.""" where Gr diag(E) (E) denotes the singular values and u, E U as well as v; V represent the left and right singular vectors, respectively. Furthermore, we can formulate the k-rank approximation to the matrix as R2 = - ouu,",, where & < r. The specific value of & can be determined as the smallest value that satisfies the condition 1/ 2 Etk R
/. In this equation, ||.|| | represents the Frobenius norm of the matrix, and Eth. (0 Esh. S 1) serves as the threshold [10]. For a comprehensive explanation of the SVD method, more explanation regarding k-rank matrix approximation, and the impact of 4th method performance please refer to the appendix sections H respectively.
2.3 Problem Statement: distrf-diitribution Detection
OOD is typically characterized by distribution that represents unknown scenarios encountered during deployment. These scenarios involve data samples originating from an irrelevant distribution, whose label set has no intersection with the predefined set. Consider the supervised setting where a neural network is given access to a set of training data ID = {(x,, y: ) drawn from an unknown joint data distribution P' defined on X x y in the training phase. We denote the input space and output space by X IR" and y = {1, 2, ..., m). respectively.
ID.
if O 27 i <7.
2 xxx =
OOOD
The parameter 7 typically selected to ensure high percentage of correct classification for in- distribution (ID) data, such as 95%. A major hurdle is to establish scoring function O(x) that
3

---

effectively captures the uncertainty associated with OOD samples. Prior approaches have predomi- nantly relied on various factors, including the model's output, gradients, or features, to estimate OOD uncertainty 23 12 In our proposed approach, we aim to compute the scoring function (xx) by leveraging orthogonal gradient projection on parameter subspace of a pre-trained network over II) data. The details of our methodology are described in the subsequent section.
2.4 Orthogonal Projection
In this section, we discuss the concept of orthogonal projection and our notation, which holds significant importance in our methodology. To simplify the explanation, will present it in 2D space, but it can be extended to higher dimensions, Orthogonal projection serves as metric that we utilize calculate the distance between a vector V and space W (represented matrix in this case).
The result of the orthogonal projection of vector V onto space W consists of three essential components: (1) The
orthogonal projection vector b., (2) the projection vector d and (3) the angle These three components' values can be utilized to determine the correlation between vector V and the space W. As depicted in the figure 2 larger value of b indicates a weaker correlation. On the other hand, 2 exhibits the opposite pattern, where larger value of ? indicates a stronger correlation. Depending on the specific application requirements, any of these values can be chosen compute the correlation. In order to align with the OOD score, where a smaller value indicates a higher degree OODness as presented equation 4 projection vector (c) into computations.
Spaase
Victor V
Projection of over space W
Figure 2: Orthogonal Projection
we incorporate the
3 Our Method: GradOrth
In this section, we describe our method GradOrth where recognize ID Vs. OOD data from different view of previous studies, computing the norm of gradient projection on the subspaces considered important for the in-distribution data.
define a sample as OOD data if its orthogonal projection value large (i.e., small projection value), indicating weak correlation with the ID data.
GradOrth OOD detection is developed following these steps:
1. Pre-trained Network subspace Computation: Our I--layer neural network with learning parameter 0 trained using ID data. Upon completion of the training process, the model parameters are frozen, resulting in a pre-trained network specialized in II) data. It is worth mentioning that we can also leverage the existing pre-trained network over our interest ID data. To retain the most significant parameters of the pre-trained network with respect to the ID data, we compute the network's last layer (L) subspace. For this purpose, we construct representation matrix denoted as R2D [at 2z4 ..... 2/)). which concatenates n representations obtained from the network's 's last layer (L) through the forward pass of n randomly selected samples (a small subset, < N) of the ID data.
Next, we perform SVD on RtD, resulting in R/p U Et (V/b)², We then proceed approximate its rank k by obtaining (R/D) k. guided by the given criteria that rely specified threshold, denoted as cxΛ:
( 2 Gn | R/D.
(5)
The pre-trained network subspace, denoted as 5h span (uf, uh...., uf defined the space of significant representation for the pre-trained network at the last layer L. This subspace is spanned by the first k vectors in UtD and encompasses all directions associated with the highest singular values in the representation. We store this subspace, s². and leverage it in the next step. We present the algorithm to compute the ID subspace in Algorithm 1.
2. Inference with OOD Data: During the inference phase, the pre-trained model is exposed to an OOD sample xzz The OOD sample propagated through the pre-trained network, and subsequently, its gradient at layer L is computed which is presented as g(z.) V L(OS)

---

In accordance with the GradNorm approach, we calculate the cross-entropy loss by com- paring the model's predicted softmax probability uniform vector used as the target. Consequently, during testing, we employ an all-one vector as the ground truth, assuming uniform distribution for the target data.
3. Detector Construction:
The model transformed into a detector by generating a score based on its output, enabling the differentiation between IID and OOD inputs. To this end, we compute the norm of sample gradient projection onto the subspace of the pre-trained network (S). We compute projection of the gradients V ((0h) onto the subspace Sh as follows:
Psz (Vor (Vol (Vo
(6)
Here, (.)' presents the matrix transpose. Next, define the OOD score for the sample as follows by computing the projection norm:
(zzz) = (Vo.
This score serves as surrogate to characterize the correlation between the sample and ID data that the pre-trained network trained on it. As presented in figure [|] it implies a weak correlation between the new sample zς and ID when the gradient g(z,) V ((0)) has small projection (large orthogonal projection) onto the subspace of the pre-trained network (large angle a)) due to the fact that stochastic gradient descent (SGD) updates lie in the span of input data points (65), please refer to the appendix, section for the proof. Algorithm presents OOD score computation.
Algorithm 1 ID Subspace Computation
Algorithm 2 3OD Score Computation
1: function Compute subspace (fe. Dip, Fes
1: function OOD Detector (fo. DOoD, 8t)
2: /lnitialization
2: //nitialization
3: 5t +[]
3: O 0+
4: B,, + Sample mini-batch of size from ID data (Dyp)
for ur DOOD do
5: A + Pre-trained network learning parameters
Gradient computation
6: // subspace Computation
6: Vo(C(0)) +- SGD(2,,
7: R/o + forward( Br., (0)).
7: //Gradient projection computation
8: UID + ()D(
8: Psu
(Vol L() (8)
9: & criteria R R <hh) Refer equation 5
9: O(z;) + Pss oVo ))]l
10: s < 0/,10: [
10: end for
return S
11: return O
Experiments
In this section, we evaluate the performance of our method GradOrth running extensive experiments considering different ID/OOD datasets and network architectures. We follow the experiment setting in general OOD baselines and explain the experimental setup in section[4.1] These empirical studies demonstrate the superior performance of GradOrth over existing state-of-the-art baselines that are reported in section We report extensive ablations and analyses that provide a deeper understanding of our methodology, please refer to the appendix, section
4.1 Experimental Setup
Dataset We leverage benchmarks proposed by [22] and 12] for detecting OOD images that are based the large-scale ImageNet dataset and CIFAR dataset. To provide fair comparison, adopt an average results-over-5-ie approach. In each run, distinct random seeds are employed to select random samples from each class, generating small subsets of in-distribution data. Subsequently, we compute the subspace of the pre-trained network based on these subsets. The OOD scores of the test data are then calculated, and FPR95 and AUROC scores derived. This process is repeated five times, and the average of these five runs is reported as the final score.
ImageNet Benchmark:
This benchmark is more challenging than others because it has higher- resolution images and a larger label space of 1,000 categories. To test our approach, we evaluate four OOD test datasets, including subsets of iNaturalist [53), SUN (56), Places [63], and Textures
5

---

These datasets have non averraaaag categories compared to the ImageNet- 1k dataset and cover a diverse range of domains including ime-grained, scene, and textural images. We follow the experimental setting reported in [12] and use the Resnet-50 model [16] pre-trained on ImageNet- 1k. For a fair comparison, all the methods use the same pre-trained backbone, without regularizing with auxiliary outlier data. Details and hyperparameters of baseline methods can be found in appendix J.I The outcomes of this study present results obtained by applying GradOrth after the last fully connected layer in all the experiments. In this configuration, the feature size is 2048 for Re and 1280 for MobileNetV2. For subspace computation, we choose 10 random samples per class and set the SVD threshold to 0.97.
8
CIFAR Benchmark: We evaluate our approach on the commonly used CIFAR-10 22) and CIFAR- 100 (26] benchmarks as in-distribution data following the experimental setting in 12 50 We employ the standard split with 50,000 training images and 10,000 test images. For subspace computation, we choose 5 random samples per class and set the SVD threshold to 0.97. We assess the model on six widely used OOD benchmark datasets: Textures 88, SVHN 40,, Places365
[3] LSUN-Crop [0], LSUN-Resize [61]. and iSUN [58]. Regarding pre-trained network architecture, we use DenseNet- 101 architecture [21]. We leverage pre-trained networks over ID datasets. Please refer to section in the appendix for more details regarding the experiment setting. It is important to note that no modifications were made to the network parameters during the OOD detection phase.
Evaluation Metrics We assess the effectiveness of our proposed method by utilizing threshold-fit free metrics that are commonly used for evaluating OOD detection, as standardized in [18]. These metrics include (i) AUROC, which stands for the Area Under the Receiver Operating Characteristic curve; and (ii) FPR95, which is the false positive rate. FPR95 represents the probability that a negative (i.e., OOD) example is misclassified as positive (i.e., ID) when the true positive rate is high as 95 (31
4.2 Results and Discussion
Our experimental studics present the promising performance of OrthoGrad in OOD detection on two benchmarks, ImageNet and CIFAR benchmarks.
4.2.1
Experimental Results on
Detection
Our method demonstrates competitive performance, reaching the state-of- the-art level, as indicated in table On the Resnet pre-trained network, GradOrth surpasses ASH-S, ASH-B, and ASH-S by 0.45%, 2.47%, and 0.93% in terms of FPR95 on the iNaturalist, SUN, and Textures OOD datasets, respectively. When evaluated the Places OOD dataset, method achieves an FPR95 of 33.67% and secures the second rank after ASH-B. Furthermore, GradNorm demonstrates an average FPR95 performance of 18.57%, outperforming ASH-B by 3.98%.
ImageNet Benchmark:
important to acknowledge the fact that GradOrth boasts low computational complexity. only requires computing the subspace of the pre-trained network once and can be conveniently utilized through a simple gradient calculation, without the need for hyper-parametes additional training during OOD detection. In contrast, certain methods like Mahalanobis [29] require collecting feature representations from intermediate layers for the entire training set, which can be computationally expensive for large-scale datasets like ImageNet. Additionally, GradOrth presents stable performance across most datasets whereas the performance of ASH versions varies across the four OOD datasets. ASH-B outperforms other baselines the Places dataset but ranks third, second, and third on the other three datasets. A similar pattern is observed for ASH-S in terms of FPR95, where it ranks second, sixth, sixth, and second across the iNaturalist, SUN, Places, and Textures datasets, respectively.
tuning or
GradOrth also exhibits superior performance in terms of AUROC, outperforming ASH-S by an average of 2.80% across the four datasets. Particularly, GradOrth surpasses ASH-S, ASH-B, and ASH- S by 0.13%. 0.66%. and 0.46% on the iNaturalist, SUN, and Textures OOD datasets, respectively.
For the pre-trained MobileNet model, our GradOrth approach also demonstrates outstanding perfor- mance. We present experimental results on leveraging MobileNet as the pre-trained ID network and evaluate the OOD detection performance on the iNaturalist, SUN, Places, and Textures datasets (the bottom section of table IT. In these experiments, GradOrth demonstrates outstanding performance. In terms of FPR95, GradOrth outperforms ASH-B, ReAt+ DiCE+ReAct, and ASH-S by 4. 4.65%, 0.40%, 6.50%, and 0.43% respectively, across the four datasets. Regarding AUROC, GradOrth

---

outperforms other baselines on average by at least 4.01% and 0.57% in terms of FPR95 and AUROC, respectively,
OOD
Model
Methods
INaturalist
SUN
Testures
FPR
AUROC
FPRUS
FPRO5
AUROC
FPRMS
AUROC
FPRRS
AUROC
Suttarx
$4.99
70.85
79.76
68,00
79.61
66.95
81.99
ODIN
47.66
69.15
81.7%
55.62
56,48
85.41
Mahalanobis
97,00
52.65
98.50
98.40
41.79
55.80
53.01
87.43
55.47
Energy
55.72
39.95
25
65.89
64.92
82.86
53.72
58.41
86.17
ResNet
EnGind
GrddNorm
42,66
54.11
76.91
90.35
40.75
46.73
85:945
50.62
43.48
$0.66
74.27
38,11
34,65
79.33
58.63
47.40
40.29
87.34
75.07
Redkct
20.38
96.22
24. 20
44.20
33.85
91.
1.300
89. 00.00
31.43
92.95
DICE
23.63
46.49
87.48
90.30
36.75
90.77
DICE Redet
18.64
45
90.67
28.07
92.74
27.25
93.40
VRA
16.82
96,92
30.65
93.65
39.50
90.75
26.72
28.
94.09
VRA-P
15.70
97.12
26 96
94.25
37.85 25
91.27
21,47
95.62
25.49
94.57
ASH--P
44.57
92.51
52.88
58.35
61.79
85.
42.05
70
50.32
89.04
ASH--
14.21
97.30
22.08
95. 10.10
33.45
92.31
21.17
32.73
95.06
ASH-S
11,49
97.87
27 98
94,02
39.78
90.98
11,93
.0.60
22,30
95. 12
GrdDOrth (Ours)
11.0g40-33
98, 28,00-1110
19,61
95.76
33, 33,67
91.78 20170
11.195091
98,06-115 TX
18.57
96,3
Softmax
64.29
77.02
77.10
79.23
76.27
73.51
77.30
75.51
79.00
ODIN
55.39
$7.62
56.07
57.36
84.71
69,95
$5.00
56.20
85.81
Mahalanohis
62.11
$1.00
47.82
86.33
52,00
83.65
92.35
33.06
63.60
71.01
Erengy
99.50
88.91
62.65
64.50
69.37
81.19
53.05
65.00
62.39
84.91
MobileNet
DICF
Reket
47.40
43.09
91.53
90.53
47 69
36.60
83.15
90:45
$1.56
53.11
85.64
85.81
52,80
58.42
91.30
91.53
45.02
41.92
89447
89.60
DICE + ReAet
52,30
93.57
31
92.
466778
15.02
16.28
96.25
31,64
92.68
ASII-P
54.92
58.61
86.72
50
83:47
48.45
58.72
57.15
87.34
AST1-n
31,46
94.38
38.45
91
10
87.56
20.92
95.07
35.66
92.13
ASH-S
50.10
91:94
43.62
00:02
58.5 94
84
13.12
10
38.67
90.95
GrdDOrth (Ours)
26.81 43.19
93,17 44.2
30.82-0054
30.82
93.18 40.40
40.27
59.12-911
12.69 96-21
97.52
4-11
27.65-0156
93.25 4L10
Table I: OOD detection results with ImageNet-lI ID. GrudOrth present outstanding performance average und
datasets. We
udopted the identical table formaal and evaluation metrics as introduced in [2] The ResNet and MobileNet models are pre- trained solely with ID data from the ImageNet- Ik dataset. We use to denote that larger values preferable, and denote that smaller values are preferable. All values are presented as percentages. All values in the table are directly taken from table 1 of [2] except for the gradient-based methods (GradNorm, ExGrad, GradOrth (ours)). For GradNorn and ExGrad, we run this experiment leveraging the code provided by the authors.
CIFAR Benehmark: In this research study, we further investigate the performance of GradOrth by conducting additional experimental studies on the CIFARIO and CIFARI 100 datasets. The key observation is that no single method consistently outperforms all other methods across diverse datasets. However, it is noticeable that GradOrth rank is always among the top three across six OOD datasets. This feature presents its promising performance for OOD detection. On the CIFARIO dataset, GradOrth demonstrates superior performance compared to other baseline methods across six OOD datasets, namely SVHN, LSUN-c, LSUN-r, iSUN, Textures, and Places365. On aver- age, GradOrth outperformy respectively. Detailed experimental results can be found in table 2 In the LSUN-c OOD dataset, DICE demonstrates superior performance with an impressive 0.26% FPR95, placing it at the top. Our method, on the other hand, ranks second with a respectable 0.81% FPR95. However, the rank- ing differs when examining the Textures and Places365 datasets. Notably, Gradorth outperforms other baseline methods in both cases, achieving noteworthy FPR95 values of 20.63% and 38, 22%, respectively. In contrast, DICE attains the sixth and ninth positions in these datasets, displaying comparatively higher FPR95 rates of 41.90% and 48.59%.
outperforms these baselines by 2.71% and 0.32% in terms of FPR95 and AUROC,
On the CIFAR 100 dataset, GradOrth surpasses its competitors in both FPR95 and AUROC by an average margin of 8.0% and 2.80%, respectively, across six well-known OOD datasets. Detailed experimental results are provided in table 3 For comprehensive discussion and analysis of the
CIFAR benchmark, please refer to the appendix, specifically section C
Method
SVIN
SUNN
L.UN
SUN
Placede5 16
AUJOCC
AUDRC
JTRU5
AUBOC:
ALBUC
AUROC
ALBICC
ALJBOC
Softrus some
17.24
57-44
11.11
05.55
13.10
41.51
41.31
91.53
01.15
18.15
5340
36 13.11
18:73
17.11
24.57
Mandaashh
18.31
07.25
Toreys somn
43.61
07.93
1.81
05.1 15
0.38
68 12
1847
98.07
16.13
16.11
38.00
41 01
35.05
61
18.63
58.72
25.77
67.87
48
11.15
13.23
97.31
13.54
41.91
9167
VRA.P
18.7%
96:08
177
94.01
8850
18 60
5.70
98.00
11.94
01-43
10.00
91.00
13.70
99.02
20.33
A
30:14
9g
8.46
96.
13.04
10-19
73
04.33
ASS-S
17.02
56.95
2.52
99.42
8.15
05 54
8.59
15.45
15.73
12.55
48.47
203 53
20.25
96.00
ASB-S
05.07
53887
48.72-1
118151144
2.338/147
96.01.31111
4.2524.09
1204
13
96.997
Places365 63 LSUN- Crop [8]] SSN--Reiize [1], and iSUN (8) GradOrth outperforms other haselines on FPR95 and AUROC on avernge. each ID dataset, we use the same DenseNett pre-trained on 10. We present the first, second, and third ranks in bluc, green, and orango colors, respectively. 1 indicates larger values are hetter and I indicutes smaller values are hetter.
Table 2: Detailed results un six common OOD benchmark datasets with CIFAR-10 as ID: Textures (8 SVIIN 400
7

---

OLID Duineds
Mathed
SYTIN
AMarag
TRRUS
AUROC
ATTOCC
FFROS
AUBOC
AUROC
TTRUS
AURROC
FIROS
AUTRC
AUTROC
1
4
1
1
1
Safana
15.4)
$2.55
14.51
14.36
GRIN
01.35
00.05
10.51
67.5
05.23
91.22
67 km
83.64
83.30 31
11:48
83.02
70.30
58.11
54.00
Manutzaste
22:41
83:31
21.07
02.66
82.13
$1.85
73.35
11,03
33.72
Gradhoom
31.47
07.08
9:24
63.75
58.23
17.76
59.00
08.31
08-17
13.04
07:34
83:10
15.95
18.76
$1.41
15.35
14.0%
$4.47
VRAUP
66:18
19:07
10.34
08.12
51.30
19
55.33 16
194 11
08.13
13:41
18:33
73.30
5321
18.71
ASEEP
K3.60
1.
07.00
101
71.08
77.5
61.55
87.71
AST3-1
53.47
M0.77
1.36
62:17
48.30
61. m1
17.80 83
91 13
63.71
88:25
$1.57
77.06
18.75
80.01
ASB-S
92.35
85.30
71.82
34,99
93
10.00 PM
17
91.26
43.73
31
38.351017
92.82
Table 3: Detailed results on six common OOD benchmurk datasets with CIFAR-100 as ID: Textures (8. SVIIN (40)
Places365 [63.
LSUN-Crop [61]. LSUN-Resiae [6]]. and ISUN (58). GradOrth octperforms other baselines on FPR95 and AUROC on average. For each ID dataset, we the same DenseNet pre-traimed on CIFAR-190 100, We present the first, second, and (hird runks blue, green, and orange colloss respectively. 7 indicates larger values are better and J. indicates smaller values are better.
4.2.2 Experimental Results on Near-OOD Detection
In this section, we demonstrate the effectiveness of our proposed method on near-OOD detection using competitive deep convolutional neural network architectures such as DenseNet and ResNet on computer vision benchmark datasets: CIFAR-10, CIFAR-100. We follow the experimental setting presented in [29 46
In-dist (model)
0OD
TNR IPR
Baseline
ODIN
Mahalanohis
AUROC
GradOrth (Ours)
Delection Ave.
CIFAR- 10 (ResNet)
CIFAR- 100
53,3/12.0/ 116/
45.3 45.3
86.17 S8.2/ 79.0 90.3
80.4 70.4/7 7826/88
CIFAR-100 100 (ResNet)
CIFAR-10
19.1 12.2//199...6...
77.1 77.77./777.///7
710/712/72.1 63.4/ 7S.
CIFAR-ID (DenseNer)
CIFAR-100
40.3/53.1/14 26-7 /
89.3790.
72.0 94.1
82.9 /29/827/ 57.25 84.7788
CIFAR-100 (DemeNec)
CIFAR-I0
18.9 189/168/7.7 7.7 10.6/21.42" 22.4420.12
75,9/ /6.21/66//7777 77,5
68.7/ 57.8 60,4 / 72.9
Table 4:
GradOrth presents stable and reliable performance on Near (eear-OODar data setting (CIFAR datasets). This table presents comparisoon of
OOD detection perfommance for all combinations model architecture and training datasets following [5
4.2.3 Experimental Results on Semantic Shift versus Non-Semantic Shift
Exploring -itl----dittibttionn data uncovers a compelling challenge: the differentiation between semantic and non-semantic shifts. In pursuit of this investigation, we adopt the experimental method- ology outlined in 199 to evaluate the efficacy of the GradOrth approach in this context.
DomainNet 43 presents a collection of high-resolution images, spanning dimensions from 180x 180 to 640x880 pixels, distributed across 345 classes within six distinct domains. Notably, four of these domains- sketch, infograph, and quickdraw quickdraw-inoorporrs incorporate class labels, thus facilitating the exploration of various distribution shift scenarios.
Our analysis focused on discerning semantic shifts by segregating classes into two subsets: Split A (comprising classes 0 172) and Split (with classes 173 to 344). In our experiment, real-A served as the in m--iisribution dataset, while the remaining subsets assumed roles as OOD datasets. Real-B represented notable example of semantic shift from real-A, whereas sketch-A exemplified a non-semantic shift. Sketch-B exhibited a convergence of both shift types. The classifier, implemented with Resnet-34 architecture, underwent 100-epoch training regimen initiated with a learning rate of 0.01. Images were uniformly center-cropped and resized to dimensions of 224x224 pixels for this experiment.
The results, as depicted in table highlight two prominent trends. Firstly, datasets characterized by both distribution shift types are notably more discernible, with non-semantic shifts following as the next most distinguishable category. Detecting semantic shifts presents the most formidable challenge. Importantly, GradOrth exhibits promising performance, as evidenced by favorable AUROC and TNR @ @TR995 metrics, underscoring its robustness and scalability in addressing practical problems. Nevertheless, there remains ample potential for further refinement and enhancement.
Choice of -n-r in GradOrth:
In order to investigate the impact of the choice of Ln-norm in Equation 7 on OOD detection performance, we conducted an ablation study. Figure iillssrates the comparison using Lnom,, Lov norm, and the fraction norm (with p = 0.3).
Among the different norms considered, we observed that the Lz-norm consistently achieved the best OOD detection performance across all four datasets. This finding suggests that the I2-noom, which equally captures information from all dimensions in the gradient space, is better suited for this task. In contrast, higher-order norms tend to unfairly emphasize larger elements over smaller ones due
8

---

000
Skin
AUROC
TNR PIRPSSA
NS
Bosetine
[SS ODIN Maha DDCColf-C
Geadlen (ouro
realB
75.1 69.9 53./ /7.3
15.3/154/500
14.0r 17.8
skeuch-A
75.5 M0.77 3M 5w5.54..51111 /8.5
20.1 31.22 11.2272
ND 57.57 40.3
skench-lt
<
81.81 85-7
89.1 (58-4
25.24 16.8 26.877350
44.1
infograph-A
79 82.7 878.0/8888888 /9.0
23.5
6/455/44 46.8
infograph B
<
#2.1 85.3 50.5 99.9/99.6
24.81 31.77 211.7/21.9/20 21.91//99.//335
51.4
quickrrww A
78.8/19044 200.4//66.22 67.4 99.9/996.
21.1
83.1 80.6
quickdiaw-B
96.6/
Table GradOrth reliable and stable performance semantic shift (S)
semantic shift settings (NS). Performance of five OOD detection methods using DomainNet. The in-distribution the real-A subset. Each value is averaged over three runs. All values in the table are exeept GradOrth. The type distribution shift presents trend difficulty the OOD detoction problem:
directly taken from table Semantic shift (S) > Non-semantic shift (NS) Semantic + Non-semantic shift.
to the effect of the exponent p. Notably, the Lx norm, which only considers the largest element (in absolute value), resulted in the worst OOD detection performance among all the norms tested. Additionally, we evaluated the fraction norm but found that it did not outperform the L2-norm in terms of overall OOD detection performance.
It is worth to mention that while both GradNorm and GradOrth leverage gradients for OOD detection, they adopt differing methodologies. GradNorm places strong emphasis the LI norm, utilizing it to assess gradient magnitudes and discern disparities between ID and OOD data. This focus on gradient magnitude forms the erux of GradNorm's 's approach. In contrast, GradOrth takes unique path by employing orthogonal gradient projection within pre-trained network subspace. In this context, the L2 norm more suitable for approximating projection length, offering a distinct perspective from the L1 norm employed by GradNorm.
FPR95
AUROCT
100
50
90
40
70
10
iNtaturalist
Places
iNtuturalist
SUN
Places
Texture
103
L2
Lgp
Loa
4
L
Ly
L
Lu
Figure Comparison OOD detection performance using various I.,. norms. Jog-nomm is bes I-nomm for GradOrth it provides the lowest FPR95 and largest AUROC for GradOrth, Results are presented for False Positive Rate at 95% True Positive Rate (FPR95) on the left, and Under Receiver Operating Characterisic curve (AUROC) the right. f indicates larger are J. indicates smaller values are better.
Related Works
To the best of our knowledge, there exists only limited prior research the use of gradients for detecting OOD inputs. This section aims to explore the connections and differences between proposed GradOrth method and prior OOD detection approaches that also utilize gradient information. In particular, we will discuss the connection between our approach and the ODIN method, the approach proposed by (28). GradNorm method 23 and ExGrad method (24). Moreover, 28 utilized gradients from all layers to train a distinct binary classifier, which can lead to a computationally burdensome process for deeper and larger models. Nevertheless, with GradOrth demonstrate that the gradient from the last layer consistently achieves the highest performance compared other gradient selections. Hence, the computational cost incurred by GradOrth is negligible.
findings
introduced the concept of utilizing gradient infor- mation for OOD detection. Their approach involved a pre-processing technique that added small perturbations obtained from the input gradients. The objective was to enhance the model's confidence in its predictions by increasing the softmax score for each input. This resulted in a larger gap between the softmax scores of ID and OOD inputs, making them more distinguishable and improving OOD detection performance. It is important to note that ODIN indirectly employed gradients through
OOD Gradient-Bann Methods ODIN 32

---

input perturbation, and the OOD scores were still calculated based on the output space of the per- turbed inputs. GradNorm [23 also utilizes gradient information from neural network to detect distributional shifts between ID and OOD samples. By measuring the norm of gradients with respect to the network's input, it quantifies uncertainty and identifies OOD samples causing significant output changes. ExGrad, proposed by (24), introduces a method akin to GradNorm with two notable distinctions. Firstly, the label distribution of y is derived from the model's predicted distribution (P) as opposed to the uniform distribution. Secondly, ExGrad computes the expected norm of the gradient, in contrast to GradNorm which calculates the norm of the expected gradient.
Discriminative Models for OOD Uncertainty Estimation The problem of classification with rejection has a long history, dating back to early works on abstention such as [6] and [15), which considered simple model families like SVMs [9]. However, the phenomenon of neural networks' overconfidence in OOD data was not revealed until the work of 41.
Early efforts aimed to improve OOD uncertainty estimation by proposing the ODIN score [22
and Mahalanobis distance-based confidence score (29). More recently, [34 proposed using an
energy score derived from a discriminative classifier for OOD uncertainty estimation, showing
advantages over the softmax confidence score both empirically and theoretically. [54] demonstrated
that an energy-based -aaed approach can improve OOD uncertainty estimation for multi-label classification networks. Additionally, (22) revealed that approaches developed for common CIFAR benchmarks might not effectively translate into large-scale ImageNet benchmark, highlighting the need to evaluate OOD uncertainty estimation in a large-scale real-world setting. These developments have brought renewed attention to the problem of classification with rejection and the need for effective OOD uncertainty estimation.
Generative Models for OOD Uncertainty Estimation Detection of OOD inputs is a crucial problem in machine learning. One popular approach is to use generative models that estimate the density directly. Such models can identify OOD inputs as those lying in lowliiklidood regions. To this end, a plethora of literature has emerged to leverage generative models for OOD detection. However, recent studies have shown that deep generative models can assign high likelihoods to OOD data, rendering such models less effective in OOD detection. Additionally, these models can be challenging to train and optimize, and their performance may lag behind their discriminative counterparts. In contrast, our approach relies on a discriminative classifier, which is easier to optimize and achieves stronger performance. While some recent works have attempted to improve OOD detection with generative models using improved metrics, likelihood ratios, and likelihood regret, our approach leverages the energy score from a discriminative classifier and has demonstrated significant advantages over generative models in OOD detection.
Distributional Shifts The problem of distributional shift has garnered significant attention in the research community. It is essential recognize and distinguish between different types of distributional shift problems. In the literature on OOD detection, the focus is typically on ensuring where OOD inputs have labels that are disjoint from the ID data, and as such, should not be predicted by the model. On the other hand, some studies have examined covariate shifts in the input space 117 37 42), where inputs may be subject to corruption or domain shifts. However, covariate shifts are commonly used to evaluate model robustness and domain generalization performance, where the label space remains the same during test time. It is worth noting that our work focuses on the detection of shifts where the model should not make any predictions, as opposed to covariate shifts where the model is expected to generalize.
model reliability and detecting label-space shifts 18 32 34
Conclusion
In this paper, we propose GradOrth, novel OOD uncertainty estimation approach utilizing infor- mation extracted from the important parameter space for ID data and gradient space. Extensive experimental results show that our gradient-basse method can improve the performance of OOD detection by up to 8.05% in FPR95 on average, establishing superior performance. We hope that our research brings light the informativeness of gradient subspace, and inspires future work to utilize for OOD uncertainty estimation. In our future research, our objective is to investigate GradOrth's 's capa- bilities considering different directions like influence functions 25 novelty detection in open- world
context [13, data pre-selection [30], and underspecification
36
10

---

References
[1] Tanmay Agarwal, Hitesh Arora, and Jeff Schneider. Learning urban driving policies using deep reinforcement learning. In 202/ IEEE International Intelligent Transportation Systems Conference (ITSC), pages 607-614. IEEE, 2021.
[2] Mark Boyer, Josiah Wai, Mitchell Clement, Egemen Kolemen, Ian Char, Youngseog Chung, Willie Neiswanger, and Jeff Schneider. Machine learning for tokamak scenario optimization: combining accelerating physics models and empirical models. Bulletin of the American Physical Society, 2021.
[3] JAMES A. CADZOW. Chapter Spectral Analysis. Academic Press, San Diego, 1987. ISBN 978-0-08-050780--1 doi: http://bbaaagg///0o0////00000000 URL
[4] lan Char, Youngseog Chung, Mark Boyer, Egemen Kolemen, and Jeff Schneider. model-based reinforcement learning approach for beta control. In APS Division of Plasma Physics Meeting Abstracts, volume 2021, pages PP11-150, 2021.
[5] Jiefeng Chen, Yixuan Li, Xi Wu, Yingyu Liang, and Somesh Jha. Atom: Robustifying out-of- distribution detection using outlier mining. In Proceedings of European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases (ECMI. PKDD), 2021.
[6] CK Chow. On optimum recognition error and reject tradeoff. IEEE Transactions on information theory, 16(1):41-44 1970.
[7] M. Cimpoi, S. Maji, Kokkinos, S. Mohamed, and A. Vedaldi. Describing textures in the wild. In Proceedings of the IEEE Conf. on Computer Vision and Patlern Recognition (CVPR), 2014.
[8] Mircea Cimpoi, Subhransu Maji, Iasonas Kokkinos, Sammy Mohamed, and Andrea Vedaldi. Describing textures in the wild. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3606-3613, 2014.
[9] Corinna Cortes and Vladimir Vapnik. Support-vector networks. Machine learning, 20(3): 273-297, 1995.
[10] Marc Peter Deisenroth, A. Aldo Faisal, and Cheng Soon Ong. Mathematics for Machine Learning. Cambridge University Press, 2020.
[11] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large- scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pages 248-255. leee, 2009.
[12] Andrija Djurisic, Nebojsa Bozanic, Arjun Ashok, and Rosanne Liu. Extremely simple activation shaping for out-of -uitt--diitribuution detection. arXiv preprint arXiv:2209.0968 2022.
[13] Thang Doan, Xin Li, Sima Behpour, Wenbin He, Liang Gou, and Liu Ren. Hyp-ow: Exploiting hierarchical structure learning with hyperbolic distance enhances open world object detection. arXiv preprint arXiv:2 14291, 2023.
[14] Angelos Filos, Panagiotis Tigkas, Rowan McAllister, Nicholas Rhinehart, Sergey Levine, and Yarin Gal. Can autonomous vehicles identify, recover from, and adapt to distribution shifts? In International Conference on Machine Learning, pages 3145-3153. PMLR, 2020.
[15] Giorgio Fumera and Fabio Roli. Support vector machines with embedded reject option. In International Workshop Support Vector Machines, pages 68 68-82. Springer, 2002.
[16] 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.
[17] Dan Hendryeks and Thomas Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. arXiv preprint
2019.

---

[18] Dan Hendrycks and Kevin Gimpel. A baseline for detecting misclassified and out- distrribbbtion examples in neural networks. Proceedings of International Conference on Learning Represen- lations, 2017.
[19] Yen-Chang Hsu, Yilin Shen, Hongxia Jin, and Zsolt Kira. Generalized odin: Detecting out- of-distribution image without learning from out-of-distribute data. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10951-10960, 2020.
[20] Edward Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.0990 2021.
[21] Gao Huang. Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4700-4708, 2017.
[22] Rui Huang and Yixuan Li. Towards scaling out-of-distribution detection for large semantic space. Proceedings of the IEEE/CVF Conference on Computer Vision and Paltern Recognition, 2021.
[23] Rui Huang, Andrew Geng, and Yixuan Li. On the importance of gradients for detecting distributional shifts in the wild. Advances in Neural Information Processing Systems, 34: 677-689, 2021.
[24] Conor Igoe, Youngseog Chung, lan Char, and Jeff Schneider. How useful are gradients for ood detection really? arXiv preprint arXiv:2205. 10439, 2022.
[25] Pang Wei Koh and Percy Liang. Understanding black-box predictions via influence functions. In International conference on machine learning, pages 1885-1894. PMLR, 2017.
[26] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. Master's thesis, 2009.
[27] Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. Simple and scalable predictive uncertainty estimation using deep ensembles. In Advances in neural information processing systems, pages
2017.
[28] Jinsol Lee and Ghassan AlRegib.
Gradients as measure of uncertainty in neural networks. In 2020 IEEE International Conference on Image Processing (ICIP), pages 2416-2420. IEEE, 2020.
[29] Kimin Lee, Kibok Lee, Honglak Lee, and Jinwoo Shin. A simple unified framework for detecting doitt--distibtttoon samples and adversarial attacks. Advances in neural information processing systems, 31, 2018.
[30] Xin Li, Sima Behpour, Thang Doan, Wenbin He, Liang Gou, and Liu Ren. Up-dp: Unsu- pervised prompt learning for data pre-selection with vision-language models. arXiv preprint arXiv: 11.00..11222.. 2023.
[31] Shiyu Liang, Yixuan Li, and Rayadurgam Srikant. Enhancing the reliability of out-of- distribution image detection in neural networks. arXiv preprint 17Xiv:1706.02660 2017.
[32] Shiyu Liang, Yixuan Li, and Rayadurgam Srikant. Enhancing the reliability of out-of- distribution image detection in neural networks. In 6th International Conference on Learning Representations, ICLR 2018, 2018.
[33] Ziqian Lin, Sreya Dutta Roy, and Yixuan Li. Mood: Multi-level nut-of-distribution detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2021.
[34] Weitang Liu, Xiaoyun Wang, John Owens, and Yixuan Li. Energy-based -iitt-ddisttitution detection. In Advances in Neural Information Processing Systems (NeurIPS), 2020.
[35] Zhenhua Liu, Jizheng Xu, Xiulian Peng, and Ruiqin Xiong. Frequency-domain dynamic pruning for convolutional neural networks. In Advances in Neural Information Processing Systems 31, pages 1043-1053, 2018.
12

---

[36] David Madras, James Atwood, and Alex D' Amour. Detecting underspecification with local ensembles. arXiv preprint arXiv:1910.09573. 2019.
[37] Andrey Malinin, Neil Band, German Chesnokov, Yarin Gal, Mark JF Gales, Alexey Noskov, An- drey Ploskonosov, Liudmila Prokhorenkova, Ivan Provilkov, Vatsal Raina, et al. Shifts: A dataset of real distributional shift across multiple large-scale tasks. arXiv preprint arXiv:2107.07455 2021.
[38] Sina Mohseni, Mandar Pitale, JBS Yadawa, and Zhangyang Wang. Self-supervised learning for generalizable out-of of-distributton detection. In Proceedings of the AAAI Conference on Artificial Intelligence, pages 5216-5223 2020.
[39] Eric Nalisnick, Akihiro Matsukawa, Yee Whye Teh, Dilan Gorur, and Balaji Lakshminarayanan. Do deep generative models know what they don't t know? In International Conference on Learning Representations, 2018.
[40] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. NIPS Workshop on Deep Learning and Unsupervised Feature Learning 2011, 2011.
[41] Anh Nguyen, Jason Yosinski, and Jeff Clune. Deep neural networks are easily fooled: High confidence predictions for unrecognizable images. In Proceedings of the IEEÉ conference on computer vision and pattern recognition, pages 427-436, 2015.
[42] Yaniv Ovadia, Emily Fertig, Jie Ren, Zachary Nado, D Sculley, Sebastian Nowozin, Joshua Dillon, Balaji Lakshminarayanan and Jasper Snoek. Can you trust your model's uncertainty? evaluating predictive uncertainty under dataset shift. Advances in Neural Information Processing 2019.
Systems,
[43] Xingchao Peng, Qinxun Bai, Xide Xia, Zijun Huang, Kate Saenko, and Bo Wang. Moment matching for multi-source domain adaptation. In Proceedings of the IEEE/CVF international conference on computer vision, pages 1406-1415, 2019.
[44] Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4510-4520, 2018
[45] Chandramouli Shama Sastry and Sageev Oore. Detecting dustt--distributionn examples with gram matrices. In International Conference on Machine Learning, pages 8491-8501. PMLR, 2020.
[46] Chandramouli Shama Sastry and Sageev Oore. Detecting -usttf-diitti examples with in-distribution examples and gram matrices. arXiv e-prints, pages arXiv-1912. 2019.
[47] Yiyou Sun and Yixuan Li. Dice: Leveraging sparsification for out-of-distribution detection. In European Conference on Computer Vision, 2022.
[48] Yiyou Sun, Chuan Guo, and Yixuan Li. React: Out-of-distribution detection with rectified activations. Advances in Neural Information Processing Systems, 34: 144-1545 2021.
[49] Yiyou Sun, Chuan Guo, and Yixuan Li. React: Out-of-distribution detection with rectified activations. Advances in Neural Information Processing Systems, 34:144-157, 2021.
[50] Yiyou Sun, Yifei Ming, Xiaojin Zhu, and Yixuan Li. Out-of-distribuife detection with deep nearest neighbors. arXiv preprint arXiv:2204.0 065007 2022.
[51] Sridhar Swaminathan, Deepak Garg, Rajkumar Kannan, and Frederic Andres. Sparse low rank factorization for deep neural network compression. Neurocomputing
2020.
[52] Cheng Tai, Tong Xiao, Yi Zhang, Xiaogang Wang, et al. Convolutional neural networks with low-rank regularization. arXiv preprint arXiv:1511.06067 2015.
13

---

[53] Grant Van Horn, Oisin Mac Aodha, Yang Song, Yin Cui, Chen Sun, Alex Shepard, Hartwig Adam, Pietro Perona, and Serge Belongie. The inaturalist species classification and detection dataset. In Proceedings of the IEEE conference computer vision and pattern recognition, pages 8769-8778, 2018.
[54] Haoran Wang, Weitang Liu, Alex Bocchieri, and Yixuan Li. Can multi-label classification networks know what they don't know? Advances in Neural Information Processing Systems, 2021.
[55] Xiaosong Wang, Yifan Peng, Le Lu, Zhiyong Lu, Mohammadhadi Bagheri, and Ronald M Summers. Chestx-ray8: Hospital-scale chest x-ray database and benchmarks weakly- supervised classification and localization of common thorax diseases. In Proceedings of the IEEE conference on computer vision and patlern recognition, pages 2097-2106, 2017.
[56] Jianxiong Xiao, James Hays, Krista A Ehinger, Aude Oliva, and Antonio Torralba. Sun database: Large-scale scale scene recognition from abbey to zoo. In 2010 JEEE computer society conference on computer vision and pattern recognition, pages 3485-3492 IEEE, 2010.
[57] Mingyu Xu, Zheng Lian, Bin Liu, and Jianhua Tao. Vra: Variational rectified activation for out-of-distribution detection, 2023.
[58] Pingmei Xu, Krista A Ehinger, Yinda Zhang, Adam Finkelstein, Sanjeev R Kulkarni, and Jianxiong Xiao. Turkergaze: Crowdsourcing saliency with webcam based eye tracking. arXiv preprint 1504.0000.6555 2015.
[59] Huanrui Yang. Minxue Tang. Wei Wen, Feng Yan, Daniel Hu, Ang Li, Hai Li, and Yiran Chen. Learning low-rank deep neural networks via singular vector orthogonality regularization and singular value sparsification. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition workshops, pages 678 669, 2020.
[60] Jingkang Yang, Kaiyang Zhou, Yixuan Li, and Ziwei Liu. Generalized out-of-distribution detection: survey. arXiv preprint arXiv:2 10. 1334, 2021.
[61] Fisher Yu, Ari Seff, Yinda Zhang, Shuran Song. Thomas Funkhouser, and Jianxiong Xiao. Lsun: Construction of scale image dataset using deep learning with humans in the loop. arXiv preprint 1506.0330000033333 2015.
[62] Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning (still) requires rethinking generalization. Communications of the ACM, 64(3): 107-115, 2021.
[63] Bolei Zhou, Agata Lapedriza, Aditya Khosla, Aude Oliva, and Antonio Torralba. Places: A 10 million image database for scene recognition. IEEE transactions on pattern analysis and machine intelligence, 4056))145,,146,, 2017.
[64] Helen Zhou, Cheng Cheng, Zachary C Lipton, George H Chen, and Jeremy C Weiss. Mortality risk score for critically ill patients with viral or unspecified pneumonia: Assisting clinicians with covid- 19 eemo planning. In International Conference Artificial Intelligence in Medicine, pages 336-347 Springer, 2020.
[65] Feng Zhu, Hongsheng Li, Wanli Ouyang, Nenghai Yu, and Xiaogang Wang. Learning spatial regularization with lmage-level supervisions for multi-label image classification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5513-5522, 2017.
14

---

Broader Impact
The objective of this research project enhance the dependability and safety of contemporary machine learning models. The outcomes of our investigation possess the potential for significant advantages and societal effects, particularly in the realm of safety-critical domains like autonomous driving. It is important to note that our research does not involve any human subjects or breach legal compliance. We not foresee any possible adverse ramifications resulting from our work. By conducting this study, our intention is to foster increased research efforts and raise awareness within both the research community and society at large regarding the issue of out-of-distribution detection in practical, real-world scenarios.
Limitation
OOD detection methods may not always detect out-of-distribution samples accurately. As it is presented in experiments, most OOD detection methods not able to recognize OOD data across different OOD datasets. They may provide superior performance on some OOD data while catastrophic performance presents comparable performance to state-of-the-arl methods, it still requires more investigation to achieve full stable performance across all OOD datasets.
other variations of OOD data. Though method, Gradorth,
15

---

Appendix
The Appendix section is organized follows:
Section A the relationship between stochastic gradient descent (SGD) updates and the span of input data points in convolutional layers.
Section presents an experimental study that evaluates the role of leveraging the last-layer gradient of the network in our method (GradOrth).
Section discusses the results of the experimental analysis on the computation of the ID subspace leveraging different numbers of ID samples per class.
Section D includes explanation of the cross-entropy loss and its derivative.
Section presents proof showing that stochastic gradient descent (SGD) updates lie in the span of input data points mini-batch setting.
Section F offers a brief explanation of singular value decomposition (SVD).
Section G
presents an ablation study that evaluates the impact of SVD on the GradOrth out-of--istributioo (OOD) detection performance.
Section
H
offers more explanation regarding k-rank matrix approximation.
Section I
examines the impact of threshold εt on GradOrth performance.
Section Iactionnprvvveee provides further information about our experiments, including networks, datasets. and the scoring functions of the baselines.
A Input and Gradient Spaces in Convolutional Layers
Our algorithm exploits the observation that updates in stochastic gradient descent (SGD) reside within the subspace spanned by the input data points (62), as discussed in section [2.1 and this appendix, section D In this section, we aim to establish this relationship specifically for convolutional layers. The analysis presented herein possesses general applicability to any layer within network, regardless of the task.
In contrast to the weights in fully connected (FC) layer, filters within convolutional (Conv) layer operate differently on the input. Let us consider a convolutional layer comprising the input tensor X' IBC, Xw, and filters 0 E RC..CCxXe xkxk Their convolution, denoted as (X, 0, +), yields the output feature map O e CCC, [35]. Here, C2 (C₂) represents the number of input (output) channels in the Conv layer, while h4s w; (hg, wo) correspond to the height and width the input (output) feature maps, and & denotes the kernel size of the filters. Figure ((a) provides visual representation of this process.
If we reshape X' into a (h, x w.) x (C: k k) matrix denoted (C; x k) x C. matrix denoted as 0, the convolution can be expressed as a matrix multiplication between & and 0, yielding
and reshape into
z0, where O TR. (ho x xC.
Formulating the convolution in terms of matrix multiplication provides an intuitive depiction of gradient computation during the pookppropagttion process. Similar to the fully connected layer scenario, in the convolutional layer, during the backward pass, an error matrix Ω of size (hi x ww) x C. (equivalent to the size of O) is obtained from the subsequent layer. As illustrated in figure (b, the gradient of the loss with respect to the filter weights is computed as follows:
VoL = x TTT.
(8)
where V. possesses shape (C, x & x k) x C. (matching the size of 0). Considering that the columns of x correspond to the input.
16

---

Inper
Weight 6
Ohiput
Irpu
(a) Forward pass
(b) Backward pass
Figure 4: The convolution operation in matris multiplication format during the forward Pass (a) and buckward pass (b).
B GradOrth Considering All The Network Layers
This experimental study presents that the gradients obtained from the final layer contain substantial and informative content. In this experimental study, we aim to investigate the content and significance of gradients obtained from the final layer in a neural network. We explore an alternative variation of the GradOrth method, focusing on the extraction of gradients from all layers of the network. The objective is to analyze the gradients of all trainable parameters across the layers and assess their informativeness. In this paper, we present this version of GradOrth as "GradOrth-All layers" and compare it with the original GradOrth, which utilizes the gradient space from the last layer. To assess the performance of the various gradient spaces, we perform gradient projection for each layer the neural network. Subsequently, we calculate the average of these gradient projections across all layers. This procedure allows to derive an OOD detection score, which refer to the OODness score. The experiment is conducted over five random subsets of the ID subspaces. Each subspace is computed by utilizing ten random samples per class in the ImageNet benchmark and five random samples per class CIFAR benchmarks. We report the average results obtained from these five runs. The outcomes of both GradOrth-All layers and GradOrth-Last layer are presented in tables 6 and
table provides comparison of the OOD detection performance using the gradient spaces from different layers (all network layers and the last network layer) on two pre-trained network architectures, the ImageNet dataset as ID data. The evaluation metries used the False Positive Rate at 95% True Positive Rate (FPR95) and the Area Under the Receiver Operating Characteristic curve (AUROC). These metrics averaged across four OOD datasets.
ResNet and MobileNet,
Our findings demonstrate that gradients from the last layer consistently outperform gradients from all layers. On ResNet and MobileNet, leveraging the last-layer gradient space results in a 1.57% and 1.52% improvement in FPR95 (on average), respectively, compared to GradOrth utilizing gradients from all network layers.
OOD Datasets
Methods
INaturalist
SUN
Textures
Average
FPR9S
AUROC
FPR95
AUROC
FPR95
AUROC
FPR95
AUROC
FPR95
AUROC
GradOnh-All layers
13:23
96.52
21.05
95.21
35.58
92.49
11.56
96.72
20.35
95.23
ResNet
GradOrih-Last layer
11.04
98.00
19.61
95.76
33.67
91.78
11.19
98.06
18.57
96.31
MobileNet
GradOnth-All layers
GradOrth- Last layer
26. 14
26.81
93.83
93.17
30.82
33.28
93.18
91.38
43.71
40.27
89.12
85.37
13.61
12.69
96.87
97.52
29.17
27.65
93.25
91.86
layer gradients space GradOrth. OODness score derived from the last layer yiclds better OOD detection performance mostly. The ResNet and MobileNet models pre-trained solely with ID data from the ImageNet--1 1k dataset. We use 1 to denote that larger values are preferable, and 1. to denote that smaller values are preferable. All values are presented as percentages.
Table detection results
ImageNNe--lk as Effectt leveruging layers
In the pursuit of extensive investigation, the CIFAR benchmark is taken into account to examine the impact of various network gradient spaces, namely the last network layer and all network layers, on the performance of GradOrth. The findings, depicted in tables 7 and & reveal that utilizing last layer gradients in GradOrth yields superior results compared to employing gradients from all network layers, with improvements of 0.82% and 1.49% in FPR95 average, respectively.
This observed outcome is highly advantageous, as gradients calculated with respect to deeper layers demonstrate computational efficiency when compared to utilizing gradients from all layers. Remarkably, the GradOrth variant derived from the final linear layer exhibits the most favorable outcomes. From practical perspective, it is only necessary perform back mack-propagation with respect
17

---

to the last linear layer, resulting in minimal computational overhead. Therefore, our primary findings are predicated on the utilization of the last fully connected (FC) layer within the neural network.
OOD
Enitasets
Method
SVHN AUROC
ESUN-E
LSUN-
ISUN
Teatures
Places365
Average
FVR95
FPR95
AUROC
FPR95
AUROC
FPR65
AUROC
FFR05
AUROC
FV955
AUROC
FFRe5
AUROC
GraDOrth-All layens
7,32
98.24
1.44
99.66
4.11
98.77
4.36
98.36
24.52
93.06
37.91
92.1 04
13.16
96.65
OraiOnth-Last loyer
5.84
96.72
0.81
99.78
2,33
96.71
4.25
96.32
20.83
94.77
38.22
91
12.34
96.99
Table 7: GradOrth leveraging last-layer network's gradient space outperforms Gradorth loveraging all network layers gradient space CIFARIO dataset. Detailed results on six common OOD benchmark datasets with CIEAR-10 as ID: Textures (8) SVHN [JD). Places365 (63).
LSUN Crop [61], LSUN Resize [6]]. and ISUN (58).. For each ID dataset, the DenseNet pre- trained CIARR 10, 1 indicates larger values are better and indicates smaller values are hetter.
OOD
Method
SVHN AUROC
LSUN-c
LSUN-r
ISUN
Placesdic
FPR05
EPRUS
AUROC
FPRO5
ALROC
FPR95
AUROC
AUROC
FPR55
AUROC
EPRUS
AUROC
GralOnth-All 27.61
92.84
4.32
49.27
91.25
48.92
88.5
34,84
91.70
GradOnth Last
24.27
92.62
48.61
89.05
33.35
92.82
Table 8: GradOrth loveraging the last-layerr network's gradient space outperforms Gradorth leveraging network layers' gradient space the CIFAR100 dataset. Detailed results on six common OOD benchmark datasets with CIEAR-100 as ID: Textures SVHN MD), Places365 [63]. LSUN Crop 61]. LSUN Resize [6]]. and (58).
dataset, we use the same DenseNet pre trained on CIFAR /00, 1 indicates larger values are better and 1 indicates smaller values are hetter.
C Analysis of the Number of ID Samples
The initial step in our proposed method involves computing the subspace of the pre-trained neural network using the ID) data. To accomplish this, we utilize a small number of data samples and pass them through the forward pass of the pre-trained network, without altering the learned parameters. Subsequently, we compute the subspace based on the last layer of the network.
To ensure comprehensive study, we conduct an empirical investigation and compute variations of subspaces by considering different numbers of samples per class. Specifically, we vary the number of samples from 5 to 40 and 10 to 30 in the CIFAR and ImageNetIK benchmarks, respectively. For each variation, we compute five random subspaces and report the average results obtained from these five subspaces. The experimental results obtained from our study are presented in tables P and 10 Specifically, we introduce notation to describe the experiments using GradOrth on the pre-trained network subspace computed based on specific number of samples per class. We denote this notation as GradOrth-S,, where n represents the number of samples per class used to compute the subspace.
OOD
Model
SVHN
ESUN=e
SUN
Plansske
FPR95
AUROC
FFROS
AUROC
FFR995
AUROC
AUROC
AUROC
AUROC
1
1
1
GradOrbbS;
2.33
20.63
0.75
2.34
5.61
2.27
95.35
11:90
Gma0OnhhS....
08.79
0.60
99.83
2.24
98.75
Table 9: Detailed results on six common OOD benchmark datasets considering different numbers of ID samples (per class) in subspace computation. For each ID dataset, we use the same DenseNet pre-trained on CIFAR-10. 7 indicates larger values are better and J. indicates smaller values beller.
OOD
SVHN AUROC
Textures
Average
FPRUS
RPROS
AUROC
FPROS
AUROC
FPRO5
AUROCC
FPROS
AUROC
FPRVS 1
AUROC
FPRUS
AUROC
1
4
1
GradOrnh S.
24.27
90.37
3.71
59.07
48.09
91.26
42.73
91.48
32.71
92.62
48.61
89:03
33.35
92.82
GradOnti-S.:
24.25
93.3%
3.75
99.09
48.08
91.29
42.70
91.52
32.65
92.66
48.63
89.04
53.34
92.83
GraiOnb-S...
24.11
91. 40
3.70
99.
09.10
48.04
91:33
42.00
91
32.64
92.65
48.5 14.54
89 05.05
53.30
92.85
GradOrth S.
24.09
93.46
3.67
99.11
47.96
91.38
42.53
91.73
32.49
92.72
46.91
90.12
32.92
93.09
Table 10: Detailed results on six common OOD benchmark datasets considering different numbers of ID samples (per class) in subspace computation. For each ID dataset, we use the same DenseNet pre-trained on CIFAR-1O0. 1 indicates larger values are better and & indicates smaller values betler.
The experimental results displayed in tables Jand 10 indicaaee that increasing the number of samples per class during the computation of the subspace for the pre-trained network does not have a significant impact on the overall performance of OOD detection. This observation suggests that leveraging pre-trained network, which has already learned the data well, diminishes the influence of the number of samples per class in the subspace computation.
18

---

OOD Dilnsels
Model
Methods
INaturalist
SUN
Places
Textures
Average
FPROS
AUROC
FPRUS
AUROC
FPRUS
AUROC
FPR95
AUROC
FIRRUS 4
AUIROC
ResNet
GradOrth-S. Sia
11.044.22
98.00
1961-322
95.764144
33,674625
91.78-822
[1
98.06
18,8
95.90-02
GradOrth-Sg Sig
10598
98 0gggt
1945etu
95.7g-0-22
33634055
91 91,3g
11,20
98.05
18.66
95.ge0
Gma0hti-SS
11.004022
980435022
95.789927
33688203
91 91,83
11.1700
98 98.88
18
95.09
MobileNet
GradOnhh-ta
26.8
93 1748a:
30822
93.18
40,274133
89. 89.12
12,69 2012
97.52 30.22
27 67668802
93225
GradOrth
25.7846ua
93.20
30.76
93.20
40.2241.1
89.13
12.65
97.55 M0.27
27 27.60
92.27
93.25
30.7520-4
05.2250
40.2g
39.30 t
12,66
97.54
27.61 20
93.3750
Table H: GradOrth performance impacted by the number of ID samples significantly. Detailed results datasets considering different numbers of ID samples (per class) in subspace compatation. We use ResNet and MobileNet pee truined on ImaggeNes- In 4, notation, n represents the
OOD benchmark
samples per class.
D Cross- Eross-Entropy Loss and its Derivative
In this section, we provide a detailed explanation of the cross-entropy loss and its derivative.
Consider single-layer linear neural network in supervised learning setting, where each training data pair (z, y) drawn from a training dataset D. Here, æ E RR represents the input vector, y In represents the label vector in the dataset, and 0 Rm*xn represents the learning parameters (weights) of the network. The model's prediction on input æ is denoted by (ax; O). For classification problems, / (ar; 0) Or, where [2;; 0) represents the k-th logit associated with the k-th class.
The total loss on the training set (empirical risk) is denoted by:
LD
Σ
(0),
(9)
(x.
where the per-example loss is defined as:
L (0) = l(y, (a:; 0)),
(10)
and ((.,)) represents differentiable non-negative loss function.
For classification problems, the softmax cross-entropy loss is commonly used, given by:
fy:
Σ
yk log ak:
(11)
where a; exp(fi E. exp(fx (f (2; 0)) represents the softmax output for the k-th class.
Using the chain rule, the gradient the loss can be expressed as:
VL (0) = fx: (I. fxx
(12)
where e'(..-) RT denotes the derivative E(...) with respect to its second argument, and f 0) represents the gradient of the model f with respect its second argument (i.e., the parameters). For the classification problem with cross-entropy softmax loss, we have:
f 0) =
V : (x; 0)],
(13)
where [a; 0) E ! represents the gradient of the k-th logit with respect to the parameters. For simplicity, let's write equation 13 as:
V (x; 0) x"
(14)
Considering that the derivative of the loss is given by:
(y fx; 0)) [a1 V1. ... am yml P.
(15)
Here, p denotes the vector. Considering equations 12
and
15
we can write equation
12 as:
19

---

(a. pxx
(16)
As result, the gradient update will be confined within the input span (æ), where the elements in display heterogeneous magnitudes, thereby impacting the scaling æ correspondingly.
E
Gradient Span Proof
Considering that the batch loss is the summation of losses incurred by individual examples, the overall batch loss for n samples can be represented as:
Liatch
Lis
(17)
where L, represents the loss of sample (ri, ya).
When employing the mean-squared error loss function, the loss of a batch is calculated as the sum of the losses of individual samples, which can be expressed as:
72 Σ
Lhatch Σ I i=1
Oz.
3:112
(18)
Following stochastic gradient optimization, we can present the gradient of this loss (per sample) with respect weights as:
VeL (0x y)x Ox.
(19)
Here, 52 E RT denotes the error vector. Therefore, the gradient of the batch loss with respect to the weights can be expressed
Lo Raøe + Z2zzz +...+ 22
(20)
is noteworthy that the gradient update remains confined within the subspace spanned by the n input examples.
Considering cross-entropy (CE) loss as the desired loss, the batch loss would be the sum of the losses of individual samples as follows:
Lbatch
Li
yk log ak:
(21)
i=
R=
Considering equation 16, the gradient of this loss with respect to the weights can be presented as:
Va LaLauth
p of + P2az +... + pa
(22)
It is important to note that the gradient update is constrained within the subspace spanned by the input examples.
Singular Value Decomposition (SVD) Explanation
Consider
matrix R, where is the number of rows and n. is the number of columns. The goal of SVD is to factorize matrix R into three separate matrices: U, Σ, and V" (transpose of matrix V), such that R UEVT & Rmxn presented in figure 5
U: An m x m orthogonal matrix, where the columns represent the left singular vectors R. Σ: x n diagonal matrix, where the diagonal entries the singular values of R (non-negative and
20

---

sorted in descending order). V"; An n. x n orthogonal matrix, where the columns represent the right singular vectors of R.
Along with singular values and singular vectors, eigen-values and eigen-vectors are also defined. An eigenvalue À and its corresponding eigenvector of square matrix R satisfy the equation R. = XV. Eigen-vectors represent directions in the vector space that are only scaled by the matrix R, while eigenvalues represent the scaling factors for those eigen-vectors.
SVD and Relationship to Eigen-values and Eigen-vectors: SVD connects eigen-values and eigen- vectors with the singular values and singular vectors of a matrix. The singular values of R are the square roots of the eigen-values of RR or R" R, and the left and right singular vectors are the eigen-vectors of RR" and R" R. respectively.
Rank and Matrix Approximation: The rank of matrix R is determined by the number of non-zero singular values in E. By keeping only the largest singular values and their corresponding singular vectors, it is possible to approximate the original matrix with a lower-rank approximation, which can be useful for dimensionality reduction and noise reduction. We leverage this feature in our approach.
R
U
7*T
M TI
m +
Figure 5: Singular Value Decomposition
Properties of SVD:
The singular values in Σ are non-negative and arranged in descending order. The columns of U and V are orthonormal, meaning they form an orthogonal basis for their respective vector spaces. The SVD decomposition is unique up to the sign of the singular values and the order of the singular vectors. SVD is a powerful matrix factorization technique that provides a compact representation of a matrix while preserving important structural properties. It finds widespread applications in various fields, such as data analysis, image processing, recommendation systems, and more [10
G Ablation study on the Impact of SVD
In this experiment, our focus is to examine the impact utilizing singular value decomposition (SVD) in the GradOrth method an ablation study. To achieve this, compute the space (as opposed to the subspace) of the pre-trained network using the ID data, without employing SVD. Consequently, the OODness score in FradOOrth-NoVT solely incorporates the orthogonal projection of the new sample onto the space of the ID pre-trained network. The experimental results obtained from both the ImageNet and CIFAR benchmarks are presented in tables [2 13 and [4] The outcomes reported in tables 12. 13 and 14 demonstrate the significant and robust performance of GradOrth compared to the GradOrth variant without SVD (GradOrth-NoSVV) On the ImageNet benchmark, GradOrth surpasses GradOrth-NoSV
by an average of 14.12% and 10.93% in terms of FPR95 for the ResNet and MobileNet pre-trained networks, respectively. Furthermore, GradOrth exhibits exceptional performance on the CIFAR benchmark, outperforming GradOrth-NoSVI by 6.44% and 8.06% on CIFAR and CIFARI00, respectively. The results obtained from this ablation study emphasize the significance of employing SVD in the GradOrth method's s OODness score. It underscores the core principle of our approach, which suggests that the essential discriminative features for identifying OOD data reside within the subspace of the ID data.
21

---

OOD Datasets
Model
Methods
NNaturalist
SUN
Places
Textures AUROC 1
Averuge
FPR95
AUROC
FPR95
AUROC
FPRY5
AUROC
FPR95
FPR95
AUROC
ResNet
GradOOrth ND VDD
28.31
94.30
30.09
93.73
44.18
81.43
28.17
93.21
32,69
90.67
GradOrth
11.04
98.00
19.61
95.76
33.67
91.78
11.19
98.06
18.57
96.31
MobileNet
GradOrib-NeSVD
GradOrth 26.81
38.45
90.21
93.17
30.82
38.02
93.18
89.26
49.31
40.27
89.12
90.18
28.52
12.69
97.52
89.68
27.65
38.58
93.25
89.83
Table Ablatioo study present importance SVD in GradOnt. GradOrth presents outstanding performance on average and across datasets, 0OD detection results with ImageNet-Ik Ik as ID. GradOrth presents outstanding performance average and across all datascts. The ResNet and MobileNet models are pre-trained solely with ID data from the ImageNet-1l 11k darasct. We use 7 to denote that larger values are preferable, and denote that smaller values are preferable.
OUD Datasels
Method
SVIN
LSUN&
LSUNT AUROC
ISUN
PlacerM55
Average
FVR95
AUROC
IPR95
AUROC
I7995
IPR99
AUROC
EPR95
AUROC
EPRS5
AUROC
FPRS5
AUROC
GradOth NeSVD
18.32 5.84
94
99.57
3.56
98,2
10.29
98.04
35.17
93.10
46.22
35.62
18.78 12.34
94.85 99
Gra0Onhh
98.72
0.81
99.78
2.35
4.25
98.32
20.65
94.77
38.22
91.54
Table 13: Ablation study recognize the importance SVD in GradOrth. Detailed resalts
OOD henchmark datasers with CIFAR-10 as ID: Textures R. SVHN (40) Places365 (6 LSUN-Crep [T) LSUN-Resize [6]. and ISUN (58) For each ID datasct, we use
same DenseNet pre-trained on CIAAR-IO, indicates larger values are better and &. indicates smaller values
OOD Dataseds
Method
SVHK
LSUNe
LSUN-r
ISUN
Placesti
AUROC
FPR95
AUROC
FPRUS
AUROC
EPR95
AUROC
AUROC
FPR95
ALROC
FPR55
AUROC
1
GradOth- NeSVD
31.43
93.70
9682
90.55
GradOnth
24.27
93.47
99007
43,09
91.26
91,48
33.35
92.82
Table 14: Ablation stady rocognize importance of SVD GradOrth. GradOrth presents outstanding performance average and across all datasets. Detailed results on six common OOD beachmark datasets with CIFAR-100 as ID: Textures 88. SVHN (0). Places365 (63.
Lsup-Crop [1], LSUN Resize [6]]. and (58)
dataset, we use the same DenseNet pre trained on CIFRR /00, 1 indicates
larger values are hetter and L indicates smaller values are hetter.
H
K-Rank Matrix Approximation
Singular Value Decomposition (SVD) can be used factorize rectangular matrix, R UEVT Rmxx Kn into the product of three matrices, where U E gmxm and V E "x" are orthonomal matrices, and E is diagonal matrix that contains the sorted singular values along its main diagonal (Deisenroth et al. (T).. If the rank of the matrix is r (r S min(m, n)). R can be expressed as R = Ei= o,u,," where u, E U and v; E V are left and right singular vectors and og E diag( ()) are singular values. k-rank approximation of R can be written as, R& = Σ "uupo"" where k: S r and its value can be chosen by the smallest & that satisfies the norm-based criteria : Relli 2 <en R| Here, 11-1lz denotes the Frobenius norm of the matrix and et, E (0, 1) is the threshold hyperparameter.
R Σ
(23)
| - Rs 2
Daj L
Σ j=k+1
of 05k where Rs = =ūij-
(24)
i=1
The degree to which R& approximates R depends on the sum of the r-k smallest singular values squared. As k approaches r, this sum becomes progressively smaller and eventually goes zero at k = r. To provide a convenient measure for this behavior independent of the size of R, let us consider the normalized matrix approximation ratio
R
(k)
15 k Sr.
(25)
||
0f +
Clearly, this normalized ratio approaches its maximum value of as k approaches r. For matrices of low effective rank, eza. (k)) is close for values of k significantly smaller than On the other hand, matrices for which m must take on high values (i.e., k RJ r) to achieve a Ez (k) near I are said to be of high effective rank (3.
I Impact of the Threshold Parameter (Eeh) on GradOrth Performance
The hyperparameter 6th. confined to the range (0, 1), serves as a threshold that influences the selection of the value of k in the matrix k-rank approximation. The initial & column vectors within matrix U
22

---

encompass the most pivotal input (representation) space for the pre-trained network. We conducted an experiment to assess the impact of eth on GradOrth's 's performance, with results outlined in table [3] Notably, values of 6th near exhibit substantial effectiveness, and we empirically set it to 0.97.
OOD Dalasets
Model
SVIN AUROC
LSUN<
LSUN-
ISUN
Testures
Places355
Average
FPRUS
FPRR5
AEROC
FPRO5
AUROC
FPRO5
AUROC
FPRSS
AUROC
FPRUS
AUROC
FPROS
AUROC
GraDDtthers 0.50
24.57
98.39
3.82
98.87
18.39
01.15
42.80
91.34
32.53
92.51
45.70
55.05
33. 80
92.77
GraDOrtheea 0.50
26.36
94.42
8.75
09.00
48.32
01.24
42.74
91.45
82.76
92 54
48.64
80.01
33.39
99.77
Gra0Orth-sas 0.97
24.27
93.47
0.71
99.07
48.00
91.20
42.78
91.48
82.71
92.62
48.61
82.03
35.35
02.82
Table 15: Detailed results six common OOD benchmark datascts considering different values for used k-rank matrix approximation. For the pre-trained network and ID dataset, we use DenseNet pre-trained on CIFAR-IO0.
J Details of Experiments
J.1 Model and Hyper Parameter
In our empirical studies and experiments, we adopt an experimental setting that aligns with the state-of-the-art (SOTA) approaches, specifically ASH [12] and DICE [47] on the CIFAR dataset, as well as ReAct [88 on the ImageNet dataset. The datasets and model architectures utilized in our experiments are summarized in table 16]
For the CIFAR-10 and CIFAR-100 experiments, we employ the six OOD datasets employed in the DICE study 47 SVHN 40), LSUN-Crop [61], LSUN-Resize [1. iSUN [88. Places365 [6]] and Textures g The ID dataset used in these experiments corresponds to the respective CIFAR dataset. The model architecture employed a pre-trained DenseNet-101 21.
For our ImageNet experiments, we adhere to the precise setup as outlined in the ReAct study [48] and [2]. The ID dataset employed in this context is ImageNet- Ik, while the OOD datasets consist of iNaturalist [53]. SUN [56] Places365 (63] and Textures (8). The network architectures utilized in these experiments are ResNet50 [16] and MobileNetV2 [44]. All networks undergo pre-training using the ID data and remain unaltered post-training, with their parameters remaining unchanged during the OOD detection phase. The performance of the baselines primarily relies on ASH and VRA. When conducting experiments involving gradient- baseet methods such as GradNorm 23 and ExGrad 24 we re-run the experiments using the code provided by the respective authors, as there may be variations between our pre-trale reetrrinee network over ID data and the models employed by the authors themselves.
Dataset
OOD Datasets
architectures
CIFAR-10 10
SVHN, LSUN C, LSUN R. iSUN, Places365, Textures
DenseNet- 101
CIFAR-100 SVHN, LSUN LSUN R. ISUN, Places365, Textures
Dens:Net-100
ImageNet
iNaturalist, SUN, Places365, Textures
ResNet50, MobileNetV2
Table 16: The datasets and models we used in our OOD experiments range from moderate to large scale, inchuding evaluations of up 10 OOD
dalasets and three anchitectures.
J.2 Datasets
ImageNet Benchmark, Large-scale evaluation In this study, the ImageNet-Ik 1k dataset [I] is employed as the ID dataset. The evaluation of the proposed approach conducted on four OOD test datasets, following the experimental setup outlined in [23]:
iNaturalist The dataset introduced by [53]. referred to as "iNaturalist", comprises a substantial collection of 859,000 images featuring various plant and animal species. These images span more than 5,000 distinct species. To facilitate efficient processing, each image within the dataset is resized ensure that the maximum dimension does not exceed 800 pixels. For the evaluation phase, a subset of 10,000 images is randomly sampled from a set of 110 classes. Importantly, these selected classes are disjoint from the ImageNet- Ik dataset, thereby ensuring the validity and independence of the evaluation process.
SUN that introduced by Xiao et al. encompasses vast collection of over 130,000 images representing various scenes. These scenes categorized into 397 distinct categorics.
23

---

Notably, it is important to acknowledge that there are overlapping categories between the SUN dataset and the ImageNet- 1k dataset. For the evaluation process, subset of 10,000 images is randomly sampled from set of 50 classes. Importantly, these selected classes are disjoint from the labels present in the ImageNet dataset. This ensures the integrity and independence of the evaluation conducted in the study.
Places The dataset introduced by [63], commonly referred to as "Places" in the research literature, is another notable scene dataset that exhibits similar concept coverage as the SUN dataset. In this study, carefully selected subset of 10,000 images is utilized from total of 50 classes. Importantly, these selected classes are intentionally excluded from the ImageNet- Ik dataset, ensuring that the evaluation process remains independent and free from any potential overlap with the aforementioned dataset.
Textures 7 consisting of 5,640 real-world texture images categorized into 47 distinct categories, utilized in this research study. For the purpose of evaluation, the entire dataset is utilized, ensuring comprehensive coverage across all available categories.
CIFAR Benchmark The CIFAR-10 and CIFAR-100 datasets, introduced by [26]. are extensively employed as ID datasets in the existing literature. CIFAR-IC R-0 comprises 10 classes, while CIFAR-100 consists of 100 classes. In line with standard practices, the dataset split utilized in this study consists of 50,000 training images and 10,000 test images. To evaluate the proposed approach, four commonly employed OOD datasets are utilized. The specific OOD datasets used in this evaluation are listed below:
The Street View House Numbers (SVHN) dataset consists of color images depicting house numbers. The dataset encompasses ten distinct classes corresponding to the digits 0-9. In this research study, the entire test set comprising 26,032 images is employed for evaluation purposes.
SVHN 40
LSUN [6]] includes a collection of 10,000 testing images featuring 10 different scenes. In this research study, image patches of size 32x32 are randomly cropped from the LSUN dataset to facilitate analysis and experimentation.
Places365 (63) comprises vast collection of large-scale photographs depicting scenes across 365 distinct scene categories. Notably, the test set of this dataset consists of 900 images per category. For the evaluation phase, a random sample of 10,000 images is drawn from the test set, thereby ensuring a representative subset for rigorous analysis and assessment.
Textures 7 includes comprehensive collection of 5,640 real-world texture images, classified into 47 distinct categories. In this research study, the entire dataset is utilized for evaluation, enabling a thorough examination of the performance and capabilities of the proposed approach across all available texture categories.
J.3 Baselines
For the reader's s convenience, we summarize in detail a few common techniques for defining OOD scores that measure the degree of ID-ness on the given sample. By convention, higher (lower) score is indicative of being in-distribution -outoff-distrbbution)..
MSP 18
utilizes probabilities obtained from softmax distributions to distinguish between cor- rectly classified and erroneous dittr---istribution examples. The baseline method relies the observation that correctly classified examples tend to have higher maximum softmax probabilities than misclassified and -iito--distribution examples.
ODIN 32
is based on the observation that using temperature scaling and adding small perturbations to the input can separate the softmax score distributions between in- and out-of-distribution images, allowing for more effective detection.
utilizes multivariate Gaussian distributions to effectively model the class- conditional distributions of softmax neural classifiers. Additionally, they employed Mahalanobis distance-based scores means of detecting out-of-distribution samples.
Mahalanobis 29
24

---

Energy Score [34] The concept of utilizing energy scores for estimating out-of-din oitto---istriuttion uncer- tainty was initially introduced by Liu et al.) The energy function employed in their approach maps the logit outputs to scalar value denoted as SEnergy (#; f) E IR. Notably, this scalar value tends to relatively lower for in-distribution data. the convention of using the negative energy score for OOD detection, ensuring that (z;; f) exhibits higher values for ID data and lower values for OOD data.
important to mention that the authors adopted
computes the norm of the gradients of a neural network with respect an input, The norm of the gradients is a measure of how sensitive the network is to input. Inputs with high norms more likely to be OOD because they more likely to cause the network to make mistake.
GradNorm 23
calculates the expected norm of the gradients of neural network with respect to an input. The expected norm of the gradients a measure how sensitive the network is to the input.
Exgrad 24
DICE 44
aims at selectively utilizing subset of significant weights to compute the output for OOD detection. By employing the technique of sparsification, the network effectively avoids incorporating irrelevant information into the output, thereby enhancing its OOD detection capabilities.
This approach based on observation that OOD data trigger distinctive activation patterns in neural networks. ReAct selectively rectifies and truncates the activations of specific hidden units, reducing overconfident predictions on OOD data.
ReAct [9
VRA leverages the variational method to find the optimal operation for maximizing the gap between ID and OOD data. It introduces suppression and amplification operations for abnormally low, high, and intermediate activations, unlike ReAct which only focuses on high activations. VRA uses piecewise functions to simulate these operations.
Variational Rectified Activation (VRA) 57
ASH [1] This method removes large portion of activations and adjusts the remaining ones. The remaining activations (e.g., 10%) are either simplified or lightly adjusted. The simplified activation representation is then propagated through the rest of the network to generate scores for both classification and OOD detection. The energy score, calculated from the logits, commonly used for OOD detection, although the softmax score also be used.
J.4
Software and Hardware
Software
We run all experiments with Python 3.8.0 and Py PoTcch 1.12.1.
Hardware All experiments are run NVIDIA RTX 3090.
25


Reviews:
[{"review_id": "Zm3AC0nw0R", "reviewer": "Reviewer_ne6G", "summary": "A method is proposed to perform out-of-distribution detection on a pre-trained classifier. The approach used by the authors is to utilize a low-rank approximation of the parameter space for in-distribution data. Gradients for in-distribution samples are more likely to be projected directly onto the parameter subspace, whereas OOD gradients are more likely to be orthogonal and have small projection values. The proposed method is simple to implement and results in impressive performance compared to other methods for out-of-distribution detection", "questions": "1)  How is this threshold $\\epsilon_{th}$ selected, it is constant across datasets? How robust is the model as this parameter is varied? It would beneficial to include the value of $k$ in the results table descriptions.\n\n2) What is the effect of batch statistics on the performance of your method? For example, ResNet uses batch normalization, meaning that the ratio of ID and OOD samples during test time will have an effect of the model predictions. How are batch statistics controlled in your experimentation?\n\nNotation:\n\n2) In section 2.3, is there a reason why $O(\\mathbf{x})$ was selected? It might be worth changing this to a different letter to prevent confusion with big O notation.\n\n3) In section 2.4 the typical notation is to represent vectors with lowercase boldface. Is there a reason for using alternative notation?\n\n4) In section 3 the acronym ID and OOD are introduced multiple times in this section.", "limitations": "Limitations are not discussed in detail. It is recommended to include a section in the Appendix to discuss this.", "rating": 6, "confidence": 4, "soundness": 3, "presentation": 2, "contribution": 3, "strengths": "1) The proposed method has low computational complexity and be easily applied to any pre-trained model.\n\n2) Impressive performance on a comprehensive benchmark. \n\n3) Good ablations performed to investigate robustness of the method and effects of different method components. ", "weaknesses": "1) The specified threshold $\\epsilon_{th}$ is not discussed in very much detail. It is unclear if the model performance depends on heavily tuning this value.\n\n2) Experiments are performed on data with significant differences between ID an OOD data. It would be valuable to assess results with CIFAR10 and CIFAR100 as an ID / OOD pairing as in \"Exploring the Limits of Out-of-Distribution Detection\".\n\n3) Writing and notation could be improved in section 2 and 3 (see questions for more comments)", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "\nDear Reviewer ne6G,\n\nThank you for taking the time to evaluate our proposed method. We appreciate your feedback and insights. Your assessment provides us with valuable insights into the strengths and areas for improvement of our approach. \nwe want to assure you that we address your questions and concerns in our revision. Please find our responses regarding your questions in the following:\n\n- Assess results with CIFAR10 and CIFAR100 as an ID / OOD pairing:\n\nThank you for your valuable suggestion in conducting further experimental investigations pertaining to near-ID OOD detection and semantic outliers. Our empirical findings have consistently demonstrated remarkable and reliable performance across both near-ID OOD detection and semantic outlier scenarios.\n\nIn our comprehensive near-ID experiments, outlined in Table 1 of the attached PDF, our approach showcased notably robust results, particularly evident within the CIFAR datasets. Furthermore, when applied to the SVHN dataset, our GradOrth approach displayed competitive performance, securing a position among the top three methods. These experiments were executed within the experimental parameters specified in [1].\n\nFurthermore, our GradOrth method has consistently displayed exceptional and unwavering performance in evaluating semantic outliers. As depicted in Table 2, GradOrth outperforms other baseline techniques in handling semantic shifts (S), a notably challenging OOD task, particularly on the real-B dataset. It is worth noting that the performance of GradOrth rivals that of the Mahalanobis method while maintaining a lower computational complexity.\n\n - Experiments evaluating the role of $\\epsilon_{th}$:\n\nWe appreciate your request for clarification.  $\\epsilon_{th}$ plays an important role but the method works well if its value is high (close to 1). The hyperparameter $\\epsilon_{th}$, confined to the range $(0,1)$, serves as a threshold that influences the selection of the value of $k$. The initial $k$ column vectors within matrix $U$ encompass the most pivotal input (representation) space for the pre-trained network. We conducted an experiment to assess the impact of $\\epsilon_{th}$ on GradOrth's performance, with results outlined in Table 2 in the attached PDF. Notably, values of $\\epsilon_{th}$ near 1 exhibit substantial effectiveness, and we empirically set it to $0.97$. \n\nFor a more comprehensive understanding of the rationale behind selecting the value of $\\epsilon_{th}$, we kindly direct you to our response to Reviewer (MCXS).\n\n- Effect of Batch normalization on the method\n\nThe batch statistics does not affect GradOrth OOD score computations. GradOrth computes per-sample gradient and leverages it to compute the OOD score of the sample.  GradNorm also computes per-sample gradient for OOD detection which avoids the the batch statistics impact on OODness score.\nHowever, in case of using specific libraries or functions to compute the gradient batch-wise, we can address the issue is using \"global statistics\" during test time rather than batch statistics. Global statistics refer to the overall mean and variance of the the training dataset, and they provide a more robust representation of the data distribution. By using global statistics during test time, the model is less sensitive to the batch composition. \n\n- Prevent confusion with big O notation.\n \n We appreciate your valuable observation. While many existing studies utilize the notation $g(x)$ to denote the OOD function, we have recognized a potential conflict with our representation of the gradient for sample $x$, denoted as $g(x)$. In our revision, we will adjust the notation to prevent any ambiguity and to ensure compatibility with complexity scores (big O notation).\n\n[1] Chandramouli Shama Sastry and Sageev Oore. Detecting out-of-distribution examples with gram234\nmatrices. In International Conference on Machine Learning, pages 8491–8501. PMLR, 2020.235\n"}, {"review_id": "Ev5xWVQjlL", "reviewer": "Reviewer_fiAZ", "summary": "This paper focuses on OOD detection based on gradient information. It seems based on the framework of GradNorm (the paper is confusing on this) to use the gradient response as the score for detecting OOD data. Specifically, it uses SVD based subspace modeling and projection of the testing sample’s gradient as the OOD detection score. As shown in the reported results, the proposed method performs well and achieves better performance on many measurements compared to the previous methods.", "questions": "The main questions are left along with the weakness points. \n\n\nHow is the computational efficiency of Algo 1 and how does the number of selected ID samples influence the time?", "limitations": "There is a paragraph discussing limitations in the paper, mainly focusing on the general limitation of OOD detection methods. The authors may enhance it by focusing on the proposed techniques, such as how the selected ID sample may influence the performance, and whether selecting more ID samples may influence the computation time.", "rating": 5, "confidence": 5, "soundness": 2, "presentation": 1, "contribution": 2, "strengths": "- Generally, it is well-motivated to use subspace analysis to enhance the gradient-based OOD detection approach.\n- Experiments are conducted comprehensively on different benchmark datasets and with different backbone models.", "weaknesses": "- The formulation of the approach is not clearly introduced or missed, which is the basis of the work. This makes the paper very confusing and influences the understanding of the model’s behavior. The details are in the following:\n     - How is gradient calculated on the testing samples when only input images are available in inference time? Does the paper use the model formulation similar to GradNorm (or ExGrad), which uses the gradient from the loss by letting the model predict uniform probability in testing? Or the proposed model uses some different strategies maybe related to the formulations in sec 2.1 (seems not make sense)? No matter what, the authors may provide a rigorous formulation and discuss the technical motivations scientifically. \n    - This influences understanding and evaluating the specific motivation and technical soundness of the subspace modeling. Is the modeling focused on the subspace of representation, gradients, or the relationship of them? Since the subspace $S^L$ obtained in Algo 1 is for the representation, understanding how the gradient is calculated in Algo 2 is important. \n\n- The evaluations are with some problems, with details as the following points:\n    - There are several operations involving randomness. I cannot find whether the paper evaluate how the randomness may influence the performance and may report the mean and std of the results while given different random seeds. \n    - Specifically, the ID representations and SVD-based subspace models are from selected samples. The results should be sensitive to the quality of the selected ID samples, especially when the number is small. I can see experiments studying how the number of selected samples may influence the results. How the randomness may influence the selection and then the results? \n    - The authors may consider analyzing and evaluating the distribution of the scores of ID and OOD samples, as in previous works. \n\n\n---after rebuttal---\nThe proposed method does make sense and performs slightly better than the main competitors, without supersize. It is a combination of several existing methods, such as GradNorm and the projection-based methods of CL. I didn't mention this issue since the representation in the original paper is very unclear and confusing, where the issues are hidden in the unclearly stated formulation.\n\nI can and only can increase the score to Borderline accept.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "\nDear Reviewer fiAZ,\n\nWe appreciate your time and effort in reviewing our paper. Your feedback provides us with valuable insights into the perception of our work, its strengths, and aspects that require improvement. In the following, we provide the response to your questions:\n\n- How is gradient calculated on the testing samples?\n\nWe greatly appreciate your request for clarification. Our methodology involves utilizing an all-one vector as the ground truth, which assumes a uniform distribution for the target data. As a result, we compute the cross-entropy loss by contrasting the model's predicted softmax probability with a uniform vector employed as the target. It's noteworthy that our approach aligns with the GradNorm [1] methodology.\n\n- Subspace computation\n\nPlease refer to subsection \"Pre-trained Network subspace Computation\" in section 3, page 4 of the paper that explains Algorithm 1 in details. As it is presented in line 173, section 3 of the paper:\n\"we construct a representation matrix denoted as $R_{ID}^L =[x_{1}^L, x_{2}^L, ..., x_{n}^L ]$, which concatenates $n$ representations obtained from the network's last layer ($L$) through the forward pass of $n$ randomly selected samples (a small subset, $n \\ll N$) of the ID data\".\n\n- How randomness is done?\n\nWe appreciate your highlighting the concern regarding our randomness computations. To ensure a comprehensive and equitable comparison, we incorporate two levels of randomness: trial-level and sample-level.\n\nFor our experimental investigations, we adopt an average-results-over-5-runs approach. In each run, distinct random seeds are employed to select random samples from each class, generating small subsets of in-distribution data. Subsequently, we compute the subspace of the pre-trained network based on these subsets. The OOD scores of the test data are then calculated, and FPR95 and AUROC scores are derived. This process is repeated five times, and the average of these five runs is reported as the final score. As documented in our paper, each subspace is computed using ten random samples per class in the ImageNet benchmark and five random samples per class in CIFAR benchmarks.\n\nIn response to your feedback, we have taken into account the standard deviations estimated across these five runs. These deviations are presented in Tables 5, 6, and 7 within the attached PDF file, and we incorporate this information in our revised version. \n\n\n\n - How is the computational efficiency of Algo 1 and how does the number of selected ID samples influence the time?\n\n      -  Our algorithm's runtime for OOD detection remains unaffected by the number of ID samples, as these samples are \"only used once\" for the subspace computation. In addition, computing the pre-trained network subspace merely involves passing these small subsets of data through the forward phase, without requiring any back-propagation. Consequently, the pre-processing computational complexity remains low, contributing to its efficiency.\n\n      - Our experimental studies present that the number of ID samples leveraged for subspace computation does not significantly influence the algorithm's performance as presented in section D of Appendix. To address your concern, we have conducted additional experiments to assess the impact of the number of ID samples on GradOrth's performance on the ImageNet dataset (in addition to our previously reported experiments on CIFAR dataset in section D of Appendix). You can find the results in Table 3 in the attached PDF file, and for further details, please refer to Appendix, Section D.\n\n      - GradOrth's time complexity is akin to that of GradNorm [1], except for the additional pre-processing step to compute the pre-trained network subspace.\n-  The authors may consider analyzing and evaluating the distribution of the scores of ID and OOD samples, as in previous works.\n\nWe greatly appreciate your insightful suggestion. Unfortunately, due to space constraints, we were unable to include the plots at this juncture. However, please rest assured that we are committed to incorporating these plots in our work to visually present the distribution of scores for both in-distribution (ID) and out-of-distribution (OOD) samples.\n\n\n[1] Rui Huang, Andrew Geng, and Yixuan Li. On the importance of gradients for detecting distributional shifts in the wild. Advances in Neural Information Processing Systems, 34:677–689, 2021.\n"}, {"review_id": "f7TPubPM65", "reviewer": "Reviewer_81Lc", "summary": "The paper proposes an OOD detection method by exploiting the orthogonal projections of gradients to a subspace. Once a model is trained on an in-distribution (ID) dataset, the k most significant features in the last layer of a network are found using SVD using a small subset of n ID samples. Then, the gradient of the loss given an input data w.r.t. the parameters of the last layer are projected to this significant subspace. Finally, the norm of this projection is used as OOD score which is expected to be large of OOD samples and low for the ID ones. The experiments are performed on 3 ID datasets (ImageNet, CIFAR10 and CIFAR100) with different architectures and OOD datasets. The results demonstrate that the proposed method achieves the highest average scores across all OOD datasets for each ID dataset. ", "questions": "- Given the similar performance of all OOD methods on this benchmark, why should one use the proposed method instead of the others?\n- How does the method perform in a near-OOD setting?\n- Is the computational time of the proposed method significantly lower than the other methods, as claimed in the paper? Please provide quantitative results.\n", "limitations": "The paper discusses some limitations of the evaluation of OOD methods in general rather than the limitations of this method.\n\nI don't see any potential negative societal impact of this work!", "rating": 7, "confidence": 4, "soundness": 3, "presentation": 4, "contribution": 3, "strengths": "- The idea of using projection of gradients for OOD detection is interesting and, to the best of my knowledge, is novel.\n- The paper presents the idea quite clearly and supports many of the claims (there is one exception I will mention in the weaknesses section) with sufficient experimental results.\n- The paper acknowledges the fact the performance of many OOD methods varies a lot in different datasets and mentions that the performance of the method holds for the datasets used in the paper. ", "weaknesses": "- The idea presented in the paper is interesting and the paper presents sufficient experiments on the common OOD benchmarks in the literature. However, the results of almost all methods are already very close to each other in this benchmark and there is no clear winner, as also mentioned in the paper. Some baseline methods may perform slightly better than those reported in the paper with a more careful hyperparameter tuning. For example, the original Mahalanobis paper reports AUROC of 99.2 on LSUN dataset when CIFAR10 is in-distribution while the paper reports 97.09 in Table 2.\nTherefore, OOD detection methods should be evaluated on more realistic and challenging scenarios to better assess their performance, such as in near-OOD detection settings as in [1] where CIFAR10 is in-distribution data and CIFAR100 is OOD and vice versa. The paper lacks an evaluation of the methods in such a more realistic and challenging setting where most OOD detection methods fail. Even if the results in this setting are not good, this should be presented as a limitation of the work. \n\n[1] Lee et al. A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attacks\n\n- The paper claims that the method has a lower computational complexity than existing methods such as Mahalanobis. However, this claim is not supported by quantitative results. As the paper claims, extracting features at intermediate layers in Mahalanobis may not bring significant computational complexity. ", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "\nDear Reviewer 81LC,\n\nWe greatly appreciate your insightful review of our paper. Your comprehensive assessment of our methodology and experimental results provides valuable feedback that will undoubtedly contribute to the refinement and advancement of our work. Please find the responses to your questions in the following: \n\n- Given the similar performance of all OOD methods on this benchmark, why should one use the proposed method instead of the others?\n\n     - \"Reliability and stability\" in \"Far-OOD\" detection: Expounded upon in section 4 of our paper, GradOrth consistently outperforms a majority of state-of-the-art methods across diverse benchmarks, affirming its \"reliability and stability\" in \"far-OOD\" detection tasks spanning various datasets and network architectures. This remarkable consistency and superior performance distinguish GradOrth from its counterparts.\n\n     - \"Reliability and stability\" in \"Near-OOD\" detection: As evidenced by the data presented in tables 1 and 2 within the attached PDF file, GradOrth's \"reliability and stability\" are showcased in \"both near-OOD detection and more challenging tasks\", spanning a diverse range of datasets and network architectures.\n\n     - \"Efficient and Simple: GradOrth's time complexity, akin to GradNorm, delivers heightened performance while maintaining a lower computational burden compared to the Mahalanobis method. This advantageous time complexity, particularly when applied to large networks, positions GradOrth as a favorable choice.\n\n\n\n- How does the method perform in a near-OOD setting?\n\nThank you for your valuable suggestion in conducting further experimental investigations pertaining to near-ID OOD detection. Our empirical findings have consistently demonstrated remarkable and reliable performance across both near-ID OOD detection and semantic outlier scenarios.\n\nIn our comprehensive near-ID experiments, outlined in Table 1 of the attached PDF, our approach showcased notably robust results, particularly evident within the CIFAR datasets. Furthermore, when applied to the SVHN dataset, our GradOrth approach displayed competitive performance, securing a position among the top three methods. These meticulous experiments were executed within the experimental parameters specified in [2].\n\nFurthermore, our GradOrth method has consistently displayed exceptional and unwavering performance in evaluating semantic outliers. As depicted in Table 2 in  the attached PDF, GradOrth outperforms other baseline techniques in handling semantic shifts (S), a notably challenging OOD task, particularly on the real-B dataset. It is worth noting that the performance of GradOrth rivals that of the Mahalanobis method while maintaining a lower computational complexity.\n\n\n- Is the computational time of the proposed method significantly lower than the other methods, as claimed in the paper?\n\nGradOrth's time complexity is akin to that of GradNorm [1], except for the additional pre-processing step to compute the pre-trained network subspace. As it is explained in GradNorm, Mahalanobis requires collecting feature representations from\nintermediate layers over the entire training set, which is expensive for large-scale datasets such as\nImageNet. In contrast, GradOrth can be conveniently used through a simple gradient projection without hyper-parameter tuning or additional training.\n\n[1] Rui Huang, Andrew Geng, and Yixuan Li. On the importance of gradients for detecting distributional shifts in the wild. Advances in Neural Information Processing Systems, 34:677–689, 2021.\n\n[2] Chandramouli Shama Sastry and Sageev Oore. Detecting out-of-distribution examples with gram matrices. In International Conference on Machine Learning, pages 8491–8501. PMLR, 2020."}, {"review_id": "fy6vwb8xYX", "reviewer": "Reviewer_6mNB", "summary": "The work proposes GradOrth, a simple post-hoc OOD detection method that seeks to improve on existing gradient-based OOD detection approaches by leveraging a selected lower-rank subspace of the gradient most relevant for OOD detection. The resulting GradOrth method shows superior OOD detection performance on a wide range of OOD detection tasks.", "questions": "1. Is there a reason why DICE's sparsification can not be implemented alongside a method like GradNorm?\n2. Previous attempts at Gradient-based approaches have shown L1 norm to be superior, do the authors have some intuition on the reasoning why L2 norm is stronger for GradOrth?", "limitations": "The authors did not directly address societal impacts however there should be no negative impacts from this work.", "rating": 6, "confidence": 4, "soundness": 3, "presentation": 4, "contribution": 2, "strengths": "1. The paper is clearly written and investigates a generally underexplored aspect of OOD detection.\n2. The resulting GradOrth post-hoc method is easy to implement and shows strong empirical performance on a wide range of OOD detection tasks.\n3. The work presents a series of relevant ablation studies ranging from the choice of norm to the number of ID samples used to compute the subspace.", "weaknesses": "1. Some comparable and competitive methods are missing. For example, the reviewer would like to see empirical results comparing DICE [1] with GradNorm [2] and KNN [3]. \n2. Additionally, the reviewer would like to see empirical result deviations, as randomness with respect to the chosen ID samples, used to compute the subspace, may be relevant to the empirical performance of GradOrth.\n\n[1] Yiyou Sun and Yixuan Li. Dice: Leveraging sparsification for out-of-distribution detection. In Proceedings of European Conference on Computer Vision, 2022.\n\n[2] Rui Huang, Andrew Geng, and Yixuan Li. On the importance of gradients for detecting distributional shifts in the wild. In Advances in Neural Information Processing Systems, 2021.\n\n[3] Yiyou Sun, Yifei Ming, Xiaojin Zhu, and Yixuan Li. Out-of-distribution detection with deep nearest neighbors. In International Conference on Machine Learning, 2022.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "\nDear Reviewer 6mNB,\n\nWe  appreciate your thoughtful evaluation of our work. Your feedback provides valuable insights that will undoubtedly contribute to the refinement and enhancement of our research. We would like to address your comments and concerns as follows:\n\nWe have compared our method against DICE [1] and the results are presented in tables 1, 2, and 3 of the paper. Thanks for pointing out KNN [3] method, we would add KNN as another baseline in our experiments and cite in our paper. It is notable that GradOrth presents outstanding performance in competence with KNN.\n\n- Experiments on DICE+ GradNorm\n\nThanks for this interesting suggestion!\nWe leverage DICE [1] network architecture provided in authors Github and plug it in GradNorm [2] to get an implementation of DICE+ GradNorm. We run experiment on Resnet50 pretrained on ImageNet as ID and tested it on 4 OOD datasets: iNaturalist, SUN, Places, and Textures. Our experimental studies did not present any improvement using the scarification threshold at 90%.\n\n\n- Previous attempts at Gradient-based approaches have shown L1 norm to be superior, do the authors have some intuition on the reasoning why L2 norm is stronger for GradOrth?\n\nWhile both GradNorm and GradOrth leverage gradients for OOD detection, they adopt differing methodologies. GradNorm places a strong emphasis on the L1 norm, utilizing it to assess gradient magnitudes and discern disparities between in-distribution (ID) and OOD data. This focus on gradient magnitude forms the crux of GradNorm's approach.\n\nIn contrast, GradOrth takes a unique path by employing orthogonal gradient projection within a pre-trained network subspace. In this context, the L2 norm is more suitable for approximating projection length, offering a distinct perspective from the L1 norm employed by GradNorm.\n\n- Additionally, the reviewer would like to see empirical result deviations, as randomness with respect to the chosen ID samples, used to compute the subspace, may be relevant to the empirical performance of GradOrth.\n\nWe appreciate your highlighting the concern regarding our randomness computations. To ensure a comprehensive and equitable comparison, we incorporate two levels of randomness: trial-level and sample-level.\n\nFor our experimental investigations, we adopt an average-results-over-5-runs approach. In each run, distinct random seeds are employed to select random samples from each class, generating small subsets of in-distribution data. Subsequently, we compute the subspace of the pre-trained network based on these subsets. The OOD scores of the test data are then calculated, and FPR95 and AUROC scores are derived. This process is repeated five times, and the average of these five runs is reported as the final score. As documented in our paper, each subspace is computed using ten random samples per class in the ImageNet benchmark and five random samples per class in CIFAR benchmarks.\n\nIn response to your feedback, we have taken into account the standard deviations estimated across these five runs. These deviations are presented in Tables 5, 6, and 7 within the attached PDF file, and we incorporate this information in our revised version.\n\n[1] Yiyou Sun and Yixuan Li. Dice: Leveraging sparsification for out-of-distribution detection. In Proceedings of European Conference on Computer Vision, 2022.\n\n[2] Rui Huang, Andrew Geng, and Yixuan Li. On the importance of gradients for detecting distributional shifts in the wild. In Advances in Neural Information Processing Systems, 2021.\n\n[3] Yiyou Sun, Yifei Ming, Xiaojin Zhu, and Yixuan Li. Out-of-distribution detection with deep nearest neighbors. In International Conference on Machine Learning, 2022."}, {"review_id": "wPRaCWS0O8", "reviewer": "Reviewer_MCXS", "summary": "The paper proposes to project the per-example parameter-gradients of the prediction head onto the orthogonal subspace of the learned features and uses the projection norm as the OODness score. The key motivation for doing so is that the parameter gradients lie in the subspace of the corresponding input features. Key highlights of this method are that it is a post-hoc detection method and is computationally efficient requiring few in-distribution examples for computing the orthogonal subspace of the features. It achieves good detection scores. ", "questions": "1. I believe that this work has some connections with [1, 2] and can be used to complement the abilities of GradOrth in interesting ways. \n2. In Appendix B, you show that the gradients obtained from all layers perform a bit worse than the final layer alone: do you think that using a different scaling factor for each layer can help in building a better estimator than just the last layer? \n3. The algorithm requires computing per-example gradients of the loss wrt parameters: how did you do this for processing a batch of examples while staying as computationally efficient as possible? A short discussion about this would be useful to include in the paper. \n4. Apart from the obvious typos in the equation on line 124 of subsection 2.2, could you please elaborate why you compare the frobenius norms of matrices ${\\bf R}$ and ${\\bf R}_k$ instead of the obvious choice of using the difference $|| {\\bf R}_k - {\\bf R}||_F$  for identifying the appropriate $k$? Is this related to the inequality between frobenius norms and squared sum of eigenvalues -- if so, it would be good to explain this. \n5. In section (3), it would be good to include the shapes of matrices wherever relevant. \n6. If you have any preliminary results/thoughts about the weaknesses section, please include it in the replies. \n\n(The new experimental results highlight the effectiveness of the method and I raise my score.)\n\n[1] Koh, Pang Wei, and Percy Liang. \"Understanding black-box predictions via influence functions.\" ICML 2017.\n\n[2] Madras, David, James Atwood, and Alex D'Amour. \"Detecting underspecification with local ensembles.\" ICLR 2020. ", "limitations": "Yes, the limitations are adequately addressed. ", "rating": 6, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "The main strength of the paper is in the idea building upon the observation that stochastic-gradient descent updates lie in the subspace of input features for detecting OOD examples. The paper is very well written and the reports various ablation studies to clearly illustrate the effects of the hyperparameter design-choices.", "weaknesses": "While the empirical results show good performance on the commonly considered benchmarks, I believe that it is essential to incorporate results related to Semantic Outliers [1] and Near-distribution Outliers, such as the comparison between CIFAR10 and CIFAR100 [2, 3]. Section 4.3 in [4] can serve as an additional reference for conducting a similar evaluation. It is worth noting that it is okay if the results are not very strong; rather, the key objective is to present a comprehensive assessment of the estimator and update the limitations section accordingly. Furthermore, it would be beneficial to include a clear rationale behind the selection of baseline algorithms -- considering a comparison with [3] would be appropriate if the primary empirical contribution focuses on far-OOD detection. \n\nI also thought that a qualitative analysis of the estimator could also be helpful in illustrating the cases where GradOrth works best and its failure cases as compared to other baseline estimators. \n\n[1] Ahmed, F., & Courville, A. (2020). Detecting Semantic Anomalies. Proceedings of the AAAI Conference on Artificial Intelligence, 34(04), 3154-3162.\n\n[2] Fort, S., Ren, J., & Lakshminarayanan, B. (2021). Exploring the limits of out-of-distribution detection. Advances in Neural Information Processing Systems, 34, 7068-7081.\n\n[3] Sastry, C. S., & Oore, S. (2020, November). Detecting out-of-distribution examples with gram matrices. In International Conference on Machine Learning (pp. 8491-8501). PMLR.\n\n[4] Hsu, Yen-Chang, Yilin Shen, Hongxia Jin, and Zsolt Kira. \"Generalized odin: Detecting out-of-distribution image without learning from out-of-distribution data.\" In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 10951-10960. 2020.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "\nDear Reviewer MCXS,\n\nThanks for your thorough evaluation of our paper. Your suggestions will significantly enhance the comprehensiveness and clarity of our work. We would like to address your comments and queries as follows:\n\n- Experiments on near-OOD and semantic outliers:\n\nThank you for your valuable suggestion! Our empirical findings have consistently demonstrated remarkable and reliable performance across both near-ID OOD detection and semantic outlier scenarios.\n\nIn our comprehensive near-ID experiments, outlined in Table 1 of the attached PDF, our approach showcased notably robust results, particularly evident within the CIFAR datasets. Furthermore, when applied to the SVHN dataset, our GradOrth approach displayed competitive performance, securing a position among the top three methods. These experiments were executed within the experimental parameters specified in [5].\n\nFurthermore, our GradOrth method has consistently displayed exceptional and unwavering performance in evaluating semantic outliers. As depicted in Table [2], GradOrth outperforms other baseline techniques in handling semantic shifts (S), a notably challenging OOD task, particularly on the real-B dataset. It is worth noting that the performance of GradOrth rivals that of the Mahalanobis method while maintaining a lower computational complexity.\n\n- using [1, 2] in Gradorth:\n\nThanks for your valuable suggestion. In our revision, we would include citations to the studies and plan to consider them for our future research.\n\n-  Scaling factor for each layer \n\n Our comprehensive empirical analyses reveal that the incorporation of layer-wise scaling factors does not lead to a significant enhancement.  The foremost challenge tied to the integration of layer-wise scaling revolves around precisely ascertaining suitable scaling factors for each layer. Importantly, the preference for the last layer emerges due to its potential to curtail time complexity, rendering it a more appealing option.\n\n\n- Per-sample gradient computations:\n\nPer-sample gradient computations can be efficiently performed using available libraries and functions. For PyTorch, the official website provides details on utilizing the transforms function for this purpose.  Similarly, in TensorFlow, efficient per-sample gradient computation can be achieved through the vectorized-map function, as elaborated on the official website.\n\nMoreover, several researchers have contributed to the development of efficient per-sample gradient computation methods, which are extensively discussed in their respective papers and accompanied by code repositories on GitHub, such as:\n\n   - Rochette, Gaspar, Andre Manoel, and Eric W. Tramel. \"Efficient per-example gradient computations in convolutional neural networks.\" \n\n   - Goodfellow, Ian. \"Efficient per-example gradient computations.\" \n\n \n-  could you please elaborate why you compare the frobenius norms of matrices and instead of the obvious choice of using the difference for identifying the appropriate ?\n\nThanks for pointing out our typo, we would fix it in our revision.\n\nWe follow the theorem presented in [3] for $k$-rank approximation. It is a convenient measure for $k$-rank approximation independent of the size of $R$. \nThe detailed explanation is as follow:\nSingular Value Decomposition (SVD) can be used to factorize a rectangular matrix, $A =U \\Sigma V^T \\in \\mathbb{R}^{m\\times n}$ into the product of three matrices, where $U\\in \\mathbb{R}^{m\\times m}$ and $V\\in \\mathbb{R}^{n\\times n}$ are orthonomal matrices, and $\\Sigma $ is a diagonal matrix that contains the sorted singular values along its main diagonal [4]. If the rank of the matrix is $r$ ($r\\leq \\text{min}(m,n)$), $R$ can be expressed as $R=\\sum_{i=1}^r \\sigma_i u_i v_i^T$, where $ u_i \\in U $  and  $ v_i \\in V $ are left and right singular vectors and $\\sigma_i \\in diag({\\Sigma})$ are singular values. $k$-rank approximation of $R$ can be written as, \n$ R_k=\\sum_{i=1}^k \\sigma_i u_i v_i^T$, where $k\\leq r$ and its value can be chosen by the smallest $k$ that satisfies the norm-based criteria : $\\lvert\\lvert  R_k \\rvert\\rvert_F^2 \\geq \\epsilon_{th}\\lvert\\lvert R\\rvert\\rvert_F^2$. Here, $\\lvert\\lvert.\\rvert\\rvert_F$ denotes the Frobenius norm of the matrix and $\\epsilon_{th} \\in(0,1)$ is the threshold hyperparameter.\n\n$R_k=\\sum_{i=1}^k \\sigma_i u_i  v_i^T$\n\n$\\lvert\\lvert  R - R_k \\rvert \\rvert ^2 = \\sum_{i=1}^m \\sum_{j=1}^n \\lvert a_{ij} - \\hat{a}_{ij} \\rvert ^2  \\sum_z^r \\sigma_z^2  $ , $ 0 \\leq k \\leq n$  \n\nsuch that  $  R_k=\\hat{a}_{ij}$ , $z = k+1 $\n\nThe degree to which $R_k$ approximates $R$ depends on the sum of the r-k smallest singular values squared. As k approaches r, this sum becomes progressively smaller and eventually goes to zero at $k = r$. To provide a convenient measure for this behavior independent of the size of $R$, let us consider the normalized matrix approximation ratio\n\n$\\epsilon_{th}(k)=\\frac{\\lvert \\lvert R_k \\rvert \\rvert}{\\lvert \\lvert R \\rvert \\rvert} = [\\frac{\\sigma_1^2+\\sigma_2^2+ ... + \\sigma_k^2}{\\sigma_1^2+\\sigma_2^2+ ... + \\sigma_r^2}]^{\\frac{1}{2}}, 1\\leq k \\leq r$.\n\nClearly, this normalized ratio approaches its maximum value of 1 as $k$ approaches $r$. For matrices of low effective rank, $\\epsilon_{th}(k)$ is close to 1 for values of $k$ significantly smaller than $r$. On the other hand, matrices for which $m$ must take on high values (i.e., $k \\approx r$) to achieve a $\\epsilon_{th}(k)$ near 1 are said to be of high effective rank [3] .\n\n[1] Pang Wei Koh and Percy Liang. Understanding black-box predictions via influence functions.PMLR, 2017.\n\n[2] David Madras, James Atwood,  Alex D’Amour. Detecting underspecification with local ensembles. \n\n[3] JAMES A. CADZOW. Chapter 9 - Spectral Analysis. San Diego, 1987. \n\n[4] Marc Peter Deisenroth, A. Aldo Faisal, and Cheng Ong. Mathematics for Machine Learning. \n\n[5] Chandramouli  Sastry and Sageev Oore. Detecting out-of-distribution examples with gram matrices. PMLR, 2020\n\n"}]

Author rebuttal:

Dear Reviewers,

We would like to express our sincere gratitude for your diligent and insightful reviews of our paper. Your thoughtful evaluation and constructive feedback are invaluable to us as we strive to enhance the quality and impact of our work.
 We definitely consider your insightful suggestions and comments in our revision.

In the attached PDF file, we have provided more experimental results raised by reviewers. 

In addition to our extensive experiment reported in the paper, we run more experiments considering Near-ID OOD detection experiments.  Our empirical findings have consistently demonstrated remarkable and reliable performance across both near-ID OOD detection and semantic outlier scenarios.

In our comprehensive near-ID experiments, outlined in Table [1] of the attached PDF, our approach showcased notably robust results, particularly evident within the CIFAR datasets. Furthermore, when applied to the SVHN dataset, our GradOrth approach displayed competitive performance, securing a position among the top three methods. These meticulous experiments were executed within the experimental parameters specified in [1].

Furthermore, our GradOrth method has consistently displayed exceptional and unwavering performance in evaluating semantic outliers. As depicted in Table [2], GradOrth outperforms other baseline techniques in handling semantic shifts (S), a notably challenging OOD task, particularly on the real-B dataset. It is worth noting that the performance of GradOrth rivals that of the Mahalanobis method while maintaining a lower computational complexity.

[1] Chandramouli Shama Sastry and Sageev Oore. Detecting out-of-distribution examples with gram234 matrices. In International Conference on Machine Learning, pages 8491–8501. PMLR, 2020.235

Meta-review: This paper proposes GradOrth, a simple post-hoc OOD detection method based on gradient information. Specifically it leverages a selected lower-rank subspace of the gradient most relevant for OOD detection. The proposed method is simple to implement and achieves improved performance compared to other methods for out-of-distribution detection. The idea presented in the paper is interesting and novel. The empirical evaluations are comprehensive.  Many important details are missing and should be included in the revision.
Decision: Accept (poster)