GROOD: GRadient-Aware Out-of-Distribution Detection
Authors: Mostafa ElAraby
Sabyasachi Sahoo
Yann Pequignot
Paul Novello
Liam Paull
Venue: Accepted by TMLR ()

Abstract: Out-of-distribution (OOD) detection is crucial for ensuring the reliability of deep learning models in real-world applications. Existing methods typically focus on feature representations or output-space analysis, often assuming a distribution over these spaces or leveraging gradient norms with respect to model parameters. However, these approaches struggle to distinguish near-OOD samples and often require extensive hyper-parameter tuning, limiting their practicality.
In this work, we propose GRadient-aware Out-Of-Distribution detection (GROOD), a method that derives an OOD prototype from synthetic samples and computes class prototypes directly from In-distribution (ID) training data. By analyzing the gradients of a nearest-class-prototype loss function concerning an artificial OOD prototype, our approach achieves a clear separation between in-distribution and OOD samples.
Experimental evaluations demonstrate that gradients computed from the OOD prototype enhance the distinction between ID and OOD data, surpassing established baselines in robustness, particularly on ImageNet-1k. These findings highlight the potential of gradient-based methods and prototype-driven approaches in advancing OOD detection within deep neural networks.

Published in Transactions on Machine Learning Research (09/2025)
GROOD: GRadient-aware Out-Of-Distribution detection
Mostafa ElAraby
(elarabim/ @mila. quebec DIRO, Université de Montréal Mila Quebec Al Institute
Sabyasachi Sahoo
Université Laval, IID
Mila Quebec AI Institute
Yann Pequignot
Institut Intelligence et Données (IID)
Université Laval
Paul Novello
DEEL, IRT Saint Exupéry
Liam Paull
DIRO, Université Montréal
Mila Quebee AI Instilute
CIPAR AI Chair
Reviewed on OpenReview: https: openreviee..... net/ forum? id- 2V74 tVuMVJ
Abstract
Out-of-distribution (OOD) detection crucial for ensuring the reliability of deep learning models in real-world applications. Existing methods typically focus on feature representa- tions output-space analysis, often assuming distribution over these spaces or leveraging gradient norms with respect to model parameters. However, these approaches struggle to distinguish near-OOD samples and often require extensive hyper-parameter tuning, limiting their practicality. In this work, we propose GRadient-aware Out- Saat-O--Distibbutiin detection (GROOD), a method that derives an OOD prototype from synthetic samples and computes class prototypes directly from In-distribution (ID) training data. By analyzing the gradients of a nearest-class clarest-cass-proootype loss function concerning artificial OOD prototype, ap- proach achieves clear separation between in-distribution and OOD samples. Experimental evaluations demonstrate that gradients computed from the OOD prototype enhance the distinction between TD and OOD data, surpassing established baselines robustness, par- ticularly on ImageNet- 1k. These findings highlight the potential of gradient based methods and prototype-driven approaches in advancing OOD detection within deep neural networks.
1 Introduction
Deep neural networks (DNNs) have demonstrated exceptional performance across domains such computer vision, natural language processing, and robotics (Goodfellow et al. 2016 LeCun et al. 2015). Their success largely relies on the assumption that training and test data follow an independent and identically distributed (lid) pattern (Krizhevsky el al. 2012 Simonyan & Zisserman 2015). However, this assumption often fails (OOD) inputs that deviate significantly
in real-world scenarios, where DNNs encounter from the training distribution (Hendrycks & Gimpel 2016). As a result, models that perform well on in- distribution (ID) data frequently produce overly confident yet incorrect predictions on OOD samples, posing significant. risks to scrityl applications such healthcare and autonomous driving (Litjens al. 2017

---

Published in Transactions on Machine Learning Research (09/2025)
Bojarski et al. 20160. In such scenarios, it becomes imperative for the model to exhibit self-awareness about
its own limitations (Gal & Ghahramani 2015). Conventional approaches that focus solely on minimizing the training loss are often ill-equipped to cope with OOD samples, thereby jeopardizing the safe and reliable
deployment of deep learning systems (Duchi & Namkoong 2018 Arjovsky et al. 2019; Shen et al. 2019 Liu
et al. 20
Consequently, several active lines of research work toward equipping DNNs with the capability to effectively detect unknown or OOD samples. Among these, post-hoc OOD detection methods stand out as the most convenient, they utilize the representations of pre-trained DNNs, require no additional training, and can be applied to any neural network. Experimental studies using large benchmarks have underscored the effectiveness of post-hoc OOD detection methods, which has led to the development of several specialized
OOD libraries (Yang et al.) 2022 Zhang et al. 2023a Kirchheim et al.. 2022 Novello et al. 2023
Existing OOD dctoction methods typically focus on either featurc-spacc-basee mcasures, which assess the distance of inputs to learned feature representations (Sun al.] 2022 Lee al.] 2018), or gradient infor- mation {Lee et al.) 2022 Sun et al.) 2021a Lee & AlRegibb 2020 Chen et al., 2023), which analyze the model's gradient space. However, these methods often struggle in scenarios where OOD samples lie near class boundaries or exhibit characteristics similar to hard in-distribution ID examples. Furthermore, current approaches rarely exploit the inherent geometry of learned feature manifolds, limiting their robustness and generalization.
To address these challenges, we propose a novel post-hoc method called GRadient- awwre Out- Of-Distribbutin detection (GROOD) that relies on feature and gradient spaces for improved OOD discrimination addressing three persistent challenges. First, it improves the detection of near-OOD samples those that are semantically close to the in-distribution by leveraging gradient vectors with respect to an artificial OOD protolype, which provide a more discriminative signal than feature or logit-based scores. Second, GROOD generalizes robustly across diverse architectures, including ResNets and Vision Transformers, where many existing methods suffer performance degradation. Third, it significantly reduces hyper-parameter sensitivity and exhibits stable AUROC performance across training epochs, alleviating the common issue of checkpoint instability. These properties make GROOD practical and reliable post-hoe framework for real-world deployment.
Our method is inspired by two complementary observations. First, the neural collapse (NC) property Papyaan et al. 2020) suggests that, at the end of neural network training, within-class variability tends to zero for sample representations in the feature space. This motivates the use of nearest class prototype (NCP) classification, which relics on distances to class prototypes, defined as the mcans of the samples of cach class in the feature space. To further enhance the discriminative power of this approach for out-of-distribution detection, we extend the logits to also incorporate distances to an additional OOD prototype, alongside the distances to the class prototypes (S 4.1.
Second, we observe that OOD samples tend to exhibit more dispersed distribution in the feature space compared to ID samples. Capitalizing on this characteristic, we introduce an artificial OOD prototype. strategically positioned to be distinct from the ID class prototypes. By then examining how sample repre- sentations respond to this OOD prototype, specifically by analyzing gradients of the NCP loss with respect to it, we can gain a more nuanced understanding of the differences between ID and OOD samples, leading to more effective discrimination in the gradient space.
Our approach differs from traditional post-hoc methods by computing gradients with respect to an artificial OOD prototype rather than the network's parameters. The magnitude of these gradients serves a key indicator: for ID data, the OOD prototype has a relatively small influence on the confidence of the prediction in the feature ure space, reflecting stable classification. In rast, for OOD data, the OOD prototype has a more substantial influence on the confidence of the prediction; meaning that a smaller shift in the OOD prototype's representation is sufficient to cause a larger change in the classification confidence. We conduct an extensive empirical study following the recent methodology introduced in the OpenOOD Benchmark (Zhang et al., 2023a), but we also evaluate our method on other recent architectures.
Our key results and contributions are sunmarized as follows.
2

---

Published in Transactions on Machine Learning Research (09/2025)
We propose GROOD, gradient-aware OOD detection framework that integrates neural collapse geometry, gradient-space analysis, and synthetic OOD generation for robust OOD discrimination.
We demonstrate, via an oracle experiment, that idealized OOD protolype significantly improves OOD detection.
We introduce novel mixup- based approach for generating synthetic OOD data, enhancing ID/OOD decision boundaries and reducing the need for additional auxiliary OOD data.
We conduct extensive empirical evaluations and ablations, demonstrating GROOD's ellectiveness and providing new insights into the interplay of feature and gradient spaces for OOD detection.
While NC is often seen as a limitation for OOD detection, as tightly clustered ID features can cause over- confident misclassifications, GROOD turns this into strength. Exploiting the geometric regularity of class prototypes, it detects OOD samples not via raw confidence but through their abnormal gradient sensitivity to a fixed synthetic OOD prototype. This prototype does not aim to represent the full diversity of OOD data, but serves as a consistent reference point, inducing discriminative gradient responses that separate ID and OOD samples while avoiding the typical overconfidence failure mode.
2 Related Work
Neural Network Properties Prior research has emphasized the significance of linear interpolation within manifold spaces, with applications ranging from word embeddings (Mikolov et al.) 2013) machine trans- lation (Hassan et al.) 2017). Extending these concepts, Verma et al. (2019) proposed manifold mixup, a method that smooths decision boundarics and reduces overconfidence near ID data. Our work primarily clas-
leverages the NC property (Papyan et al. 2020 Kothapalli et al. 2022 and prooooypee/eenrroid-bbee sification. Specifically, we exploit the sensitivity of the OOD prototype to enhance the distinction between ID and OOD samples. To construct this OOD prototype, we employ manifold mixup to generate a synthetic OOD dataset, enabling a more robust and structured detection framework.
History of OOD Detection The study of handling OOD samples has long history, dating back to carly works on classification with rejection (Chow) 1970 Fumera & Roli, 2002). These early methods introduced low, often using simple model families such SVM (Cortes & Vapnik 1995). The phenomenon of neural networks producing overconfident predictions on OOD data was first revealed by Nguyen et al. (2015), highlighting the need for robust detection mechanisms in modern deep learning systems. Building on this foundational work, subsequent research has focused on various techniques for detecting OOD samples, which can be broadly categorized as output-based, feature- basod, and gradicnt-base based methods.
the idea of abstaining from classification when confidence
Many OOD detection approaches directly utilize the model's outputs. Max- imum softmax probability, often scaled for calibration, is a classic OOD detection metric (Hendrycks & Gimpel 2016 Guo et al. 2017). Building on this, temperature scaling combined with input perturbations has shown promise in refining the separation between ID and OOD data (Liang et al. 2018). Additionally, logits themselves have been used for OOD detection, with some mothods applying metrics such as KL di- vergence (Heudrycks el al., 2022). Beyond these, energy-based methods compule OOD scores using energy derived from logits (Liu al.) (020)) Refinements such truncating activations (Sun et al. 2021b Sun & Li 2022) or removing dominant singular values (Song al. 2022 Djurisic et al., 2022 have been proposed to reduce overconfidence. Generalized entropy scores over logits have also emerged
Output-Based Methods
robust alterna- tive [Liu et al. 2023). Unlike the aforementioned techniques, GROOD achieves robust OOD detection, even for samples near ID boundaries, by combining gradient norms with class prototype-based representations.
Beature-Based Methods The feature space neural networks has been a rich avenue for OOD detec-
tion. Techniques such as Mahalanobis distance from class centroids (Lee et al. 2018 Ren et al., 2021 | and
Gram matrices of features [Sastry& & Oore 2020) are prominent examples. Additional methods utilize noise
prototypes (Huang et al.] 2021a), virtual logits (Wang et. al. 2022 and nearest neighbor distances (Sun
3

---

Published in Transactions on Machine Learning Research (09/2025)
et al. 2022 Modern Hopfield networks Zhang et al. 2023b) have also been explored for this purpose. Cosine similarity between test samples and class features has gained traction, with some methods proposing the use of singular vectors for enhanced detection (Za-
et al. 2020 Chen et al. 2020)
cemzadeh et al. 2021). Our approach extends these ideas by incorporating an artificial OOD prototype into the feature space, crealing a novel gradient-based perspective for OOD detection.
Gradient-Based Methods Gradient-based methods have gained attention for their ability to capture additional information beyond intermediate layers or network outputs. The seminal ODIN approach int.ro- duced input perturbations guided by gradients to enhance OOD separation (Hsu et al. 2020). Subsequent works explored the use of gradients with respect to network weights to quantify uncertainties (Lee & AlRegib,
2020 Igoe et al. 2022: Huang et. al. 2021b). Another direction utilizes Mahalanobis distances between input gradients, combined with self-superviser classifiers, to detect OOD samples (Sun et al. 2021a). GradNorm calculates an OOD score based on the gradient space of the final layer weights (Huang et al. 2021b). Recent methods, like GAIA (Chen al.) (203). leverage gradient- gradient-based attribution abnormalities with respect to the feature space, combining channel-wise features and zero-deflation patterns. In contrast, GROOD uniquely focuses gradients with respect to artificial OOD prototype, capturing subtle differences be- tween ID and OOD data. This approach enables GROOD to improve detection performance by leveraging gradient information in conjunction with prototype-based representations.
3
Preliminaries and Notation
We first introduce the foundational problem of OOD) detection and establish the notations.
3.1 Context and Notations
Robust deployment of machine learning models in dynamic real-world environments often requires distin- guishing between in-distribution (ID) and out-of-distribution (OOD) data to ensure reliability and safety, To formalize this challenge, we consider a supervised classification problem. Let X denote the input space C. the label space, where each input-output pair (x,y) is sampled from a joint data
and Y = distribution Pxy. The training set Dmn {(1,, w)) assumed be drawn iid from Pxy. Let Px represent the marginal distribution over X. The marginal distribution of the in-distribution data, denoted as Pi.: is assumed to be sampled from Px.
The neural network f X > R|Y| is trained on samples from Pxy to produce a logit vector, subsequently used for label prediction. The architecture of f is decomposed as:
f foll fren, where fren fmid f fearly.
(1)
Here, fearly extracts low-level features, fuid processes mid-level representations, and fren produces penulti- mate features. The final classification module felf outputs the predictions.
3.2 Problem Setting: Out-of-Distributio Detection
When deploying machine learning model in practice, the classifier should not only be accurate on ID samples but should also identify any OOD inputs as "unknown".
Formally, OOD detection can be viewed as a binary classification task. During testing, the task to determine whether a sample x X comes from Po (ID) or not (OOD). The decision can framed as a level set estimation:
ID. if S(x) <T, OOD, if S(x) >T.
(x)
where S: X IR is a score function quantifying the likelihood of sample belonging to the ID distribution, and J is a threshold ensuring that high fraction (e.g. 95%) of ID data is correctly classified.
4

---

Published in Transactions on Machine Learning Research (09/2025)
4 GROOD Methodology
Input
Feature Extractor
Feature Representation
Distance to Prototypes
OOD Score
f pen
Pood
|/ Pdtag 112
114 Poot 2
Pon
000
|| POOD
Figure 1: Initially, we build ID class prototypes the means of the activations of ID data along with an OOD prototype capturing OOD charactcristics (S 5). Subsequently, gradients of the softmax loss built upon the NCPs distance as logits are computed w.r.t. OOD prototype ($ 4.1 Finally, the OOD score is determined using nearest neighbor distance the gradient space
Overview In this section, we introduce our proposed method GRadient-aware tion (GROOD), a novel framework for distinguishing between ID and OOD samples. To illustrate the core mechanism, We assume the existence of an OOD prototype (see $ 5.1 and use it to compute gradients and define our OOD score.
detec-
The method comprises two primary components, illustrated in Figure (1) A gradient computation frame- work that quantifies sample responses to OOD prototype ($ 4.1 and (2) A nearest-neighbor scoring
mechanism operating in gradient space ($ 4.2
4.1 Gradients Computation
Guided by the observations in we build distanco-based classification framework that integrates both class prototypes and an artificial OOD prototype. Under the NC property (Papyan et al. 2020), ID features concentrate around their class prototypes, making distances natural choice for logits. In contrast, the OOD prototype is positioned away from these clusters and used as a reference point, allowing us to capture the difference between ID and OOD through their gradients.
For feature vector in the penultimate layer space, we define the logit vector as
((h) 1| pen 12, l2..... ||
Pc l2.
|| pedd [|];
(2)
where p pen represents the prototype for class i, and posn denotes the OOD prototype. These negative distances transformed into probabilities through the softmax function:
(h(h) exp(Lx(h)) Σ (x)(
1=1,..,,++
(3)
where (h+ (ho represents the probability of the sample being OOD.
This formulation enables us to quantify, through the NCP loss, how well a sample aligns with the ID prototypes versus the OOD prototype. For an ID sample, we expect strong alignment with one of the class prototypes and weak alignment with the OOD prototype.
For given feature vector h and a class I,.., C.C++ 1, the cross-entropy loss associated with the NCP output [p:(h)]++ from equation 3 is given by:
H(h,y) v) log (l))
(4)
5

---

Published in Transactions on Machine Learning Research (09/2025)
OCD
Geso
001
25
-5
-50
-3
(a)
(b)
Figure 2: (-SNE plots on CIFAR-10 with ResNet-18. (a) Feature space: TD clusters vs. dispersed OOD, (b) Gradient space: clearer ID/OOD separation.
The key insight of our method lies in analyzing the gradient of the loss Hh, y) for some (any) iid class with respect to the OOD prototype pood Intuitively, this quantity represents the update vector for the OOD prototype assuming that the feature h corresponds to an iid sample. As derived in appendix A.6 this gradient can be expressed in closed form as follows:
h P pen
VH(h): = pen Hh,, (h, C+ Pood(h)
(5)
h h
pen
2
These computations are grounded in two core observations. The first is inspired by the Neural Collapse phenomenon (Papyan et al. 2020), which shows that well-trained networks often align penultimate-lan features with their corresponding class prototypes. The second is that OOD samples tend to lie outside these tight clusters, often in low-density dispersed regions. To leverage these properties, adopt the & distance as our metric. This choice is not arbitrary: it ensures that the gradient simplifies to the closed- form in equation 5 where the gradicnt's norm directly equals the OOD softmax probability Pood and its dorection (h - Pood)/ll/ -oolll2 encodes the feature's geometric deviation from the prototype. Such a direct coupling between magnitude, direction, and OOD likelihood essential to GROOD's mechanism and would not arise with alternative metrics like cosine similarity.
For ID) samples, we observe smaller gradient norms due to lower OOD probabilities. However, the complete gradient vector provides richer information than the norm alone, encoding both magnitude and directional differences between ID and OOD samples. This allows us to detect OOD samples through both the size of the hypothetical update to pood and its direction.
To analyze the potential for enhanced separability, fig. visualizes (a) the penultimate feature space and (b) the gradient space using (-SNE. Our intuition that the gradient (H) will yield a more distinct separation between ID and OOD samples compared to the feature space. As seen in fig. 2 (a), ID samples form class-specific clusters, while OOD samples are scatttered in the space. However, the t-SNE plot of the gradient space in fig, 2 (b) reveals different spatial arrangement, suggesting that the gradient transforma- tion highlights discriminative characteristics for OOD detection, which GROOD leverages through distance computations in this space (eq. 6
4.2
Final OOD Score Computation
Having established how to compute discriminative gradients with respect to an OOD prototype, we now address a koy challenge: how to effectively use these gradients to distinguish between ID and OOD samples. Our solution leverages the observation that ID samples produce similar gradient patterns, while OOD samples generate distinctly different ones.

---

Published in Transactions on Machine Learning Research (09/2025)
4.2.1 Distance- Distance-Based Scoring
For a test sample Tnew; we first compute its feature representation h((rnew) and corresponding gradient V (h(wew)))) Our OOD score then defined as the distance the nearest training gradient:
((Fnew) min [V(((()new) 1 (H()))) zEDi
(6)
This formulation captures our intuition that OOD samples will produce gradients that deviate significantly from those seen during training, The minimum distance provides natural measure of "outlierness" the further gradient is from its nearest training neighbor, the more likely the sample is to be OOD.
Efficient Implementation A naive implementation of nearest neighbor search in high-dimensionn gra- dient space would be computationally prohibitive. We address this challenge using the FAISS library Douze et al. 2024p, which provides efficient approximale nearest neighbor search through inverted lists and quan- tization. This makes our method practical for large-scale applications while maintaining accuracy.
The preceding section outlined the methodology of GROOD, detailing how gradients with respect to OOD protolype are computed and subsequently used within nearest-neighhor scoring mechanism to distinguish ID and OOD samples. A critical element underpinning the effectiveness of this methodology is the choice and construction of the OOD prototype, Pond- The nature and location of this prototype in the feature space directly influence the direction and magnitude the computed gradients, thereby impacting the separability of TD and OOD samples the gradient space. Therefore, the following section delves into the specific strategies we employ for Prototype Computation ($5), exploring various approaches define both the class prototypes and, crucially; the OOD protolype. These approaches designed to yield a peed that optimizes the discriminative power of the gradient-basee OOD score introduced in methodology.
5 Prototype Computation
5.1 Class and OOD Prototypes
The foundation of our method lics in computing class-disciminntive prototypes. For cach class, we compute prototypes at both early and penultimate layers as the average of feature vectors:
P/ =
Σ (()), E {early, pen] TEX,
(7)
X
where X, is the set of training instances in class y- Similarly, the OOD prototype is computed as the average of feature vectors from a dataset Xood:
Food
pen
(p)
(8)
Xood
x
The less variability in the representation space of each ID class as per Papyan et al. 2020 the more effective GROOD will be in distinguishing ID and OOD samples.
Clearly, the choice dataset Xood will have a significant impact on GROOD's s ability to differentiate between ID and OOD samples. In the remainder of this section we will first show that, given access actual OOD data, GROOD performs significantly better than the state of the art (Sec. 5.1.Ip. Subsequently, we propose method for synthesizing the OOD data used calculate the OOD prototype that. approximates the performance of the priviliged case (Sec. 5.2).
5.1.1 "Oracle" Experiment
To validate the core idea that an OOD prototype can help distinguish ID and OOD data, we performed an "oracle" experiment, assuming temporary access to some OOD information.

---

Published in Transactions on Machine Learning Research (09/2025)
Table I: Oracle experiment results compared to SOTA excluding GROOD from Table 2
AUROC (%) on far-
OOD and near-OOD detection using 100 prototype samples. Results are averaged over different checkpoints; standard deviations in parentheses.
Local Oracle
Global Oracle
SOTA
ID Dataset
Architecture
AUROC (%) 1
FarOOD
Near-OOD
Far-ODD
Near-OOD
Far-OOD
Near-OOD
CIFAR-10
ResNet-18
96.7 (+0.2)
95.4 (+0.1)
94.8 (#0.1)
90.8 (#0.1)
94.7
90.7
CIFAR-100
ResNet-118
94.8 (+0.2)
85.5 (+0.5)
88.1 (#0.03)
82.1 (#0.1)
82.4
81.3
ImageNet-2000
ResNet-11
98.8 (+0.2)
92.1 (+0.2)
94.22 (+0.02)
84.1 (#0.2)
93.16
82.9
ImaggeNet-1K
ResNet-50
97.9
91.0
96.2
79
95.1
78.1
Local Oracle (Idealized): For each ID-OOD test pair, used small sample (100) from the test OOD data to build specific OOD prototype. We then tested the remaining OOD data. This sctup essentially asks: "If we had perfect knowledge of a small subset of the specific OOD data we'd encounter, how well could our method perform?". The remarkable performance achieved this setting (over 95% AUROC on far-OOD detection, as shown in table [ highlights the inherent potential of an OOD prototype tailored to the specific distributional shift.
Global Oracle (Generalizable)) For each IT) dataset, we used a small "validation" portion of all other OOD datasets to create single, general OOD prototype. We then tested on the held-out portion of each specific OOD dataset. This setup aims to mimic a scenario where we have access to some diverse OOD data (the validation sets) but not the specific OOD data we are currently testing on. The results from the Global Oracle provide insights into how well a more general OOD prototype can generalize across different out-of-distribution scenarios.
Despite the strong performance in the far-OOD detection tasks under both oracle settings, the notably lower performance ncar-OOD detection underscores the inherent difficulty of distinguishing between distributions that are semantically or statistically close to the in-distribution data. Nevertheless, the oracle experiments strongly suggest that the concept of an OOD prototype holds significant promise for OOD detection when a representative prototype can be effectively determined.
On the other hand, in real-world scenarios, we cannot construct this oracle protolype using lest OOD data. This raises a key question: How con we opprozimate this optimal OOD prototype without access to the test distribution?
5.2 Practical 00D Prototype Construction
The oracle experiments presented in 5.1 demonstrated the significant potential of employing OOD prototype to distinguish between TD and OOD data, achieving high performance when even approximate knowledge of the OOD distribution was available. This motivates our goal: to effectively approximate such an optimal OOD prototype, proar without requiring access to the specific test OOD distribution, which is unavailable in practical scenarios.
While real-world OOD samples exhibit considerable diversity, representing them with a single prototype pen proves effective within our gradient-aware framework. Our approach does not aim represent all OOD samples geometrically, but rather uses the prototype fixed reference point. The core OOD relies on the sensitivity of the NCP loss to this prototype, measured via the gradient V Vp (h) ($4, eq. (5)). We hypothesize that OOD samples, inherently deviating from learned ID manifolds, exlubit distinct gradient sensitivity patterns (both magnitude and direction) relative to this OOD reference point, allowing separation from more stable ID samples.
We propose several complementary approaches construct pood: leveraging information from an auxiliary OOD dataset Xood:
8

---

Published in Transactions on Machine Learning Research (09/2025)
Synthetic OOD Generation using mixup Our first approach requires no external OOD data, instead synthesizing OOD-like features by exploiting decision boundaries. We perform guided prototype interpolation towards the second-highest predicted class C2 at an early layer (after the first block):
((x) = fmid (A pearty (x) + (1 - A)p early)
(9)
where A 0.5 positions the synthetic samples near decision boundaries. This approach leverages our observation that early layer representations are more sensitive to perturbations, making them ideal for generating OOD-like features. Although effective, mixup-generated OOD samples interpolate between ID classes and may not fully capture OOD diversity.
Auxiliary OOD Validation When available, we can utilize a small auxiliary OOD validation set as Xood to construct the prototype following eq. (8) using 100 OOD validation samples. Importantly, we ensure these samples have no category overlap with the test set. Our method shows remarkable stability to the specific choice of validation samples, with maximum AUROC standard deviation of only 0.5% across five different random selections.
Proximity-Based OOD Filtering (Postprocessing) Initially, we explored constructing the OOD pro- totype by simply averaging feature vectors from all available OOD samples. However, this approach yielded prototypes that lacked sufficient discriminative power, resulting in poor scparation between ID and OOD data. To address this, we introduce a proximity-based filtering step to refine the OOD prototype, enhancing its ability to distinguish OOD samples from ID) samples.
Specifically, given a set of candidate OOD feature vectors, we discard OOD samples whose distance Bood d = min, (o, Pyll2 ll falls below an adaptive threshold T, computed as the q-th quantile of {d; Her' This filtering step refines the OOD prototype by ensuring separation from ID data while preserving repre- sentativeness.
A comparison of alternative XOOD generation methods is presented in the appendix A.2 The results reported in the remainder of this paper utilize the OOD prototype derived from synthetic data generated from ID samples.
6 Experiments
For comprehensive evaluation of GROOD's performance, adhere to the OpenOOD v1.5 criteria Zhang et al. 2023a) Yang et al. (2022). Results are aggregated in table 2 including the performance of the nearest class prototype used instead of the classification head. For robustness, each evaluation metric except for ImageNet-lk is derived from three runs with unique initialization seeds. In the case of ImageNet- 1k, we report results based on a single seed run provided by torchvision maintainers contributors (2016).
We evaluate performance using the Area Under the Receiver Operating Charac- teristic curve (AUROC), where higher values are better. Our benchmarking strategy follows the OpenOOD framework Zhang et al. 2023a): Yang et al. (2022), involving four core ID datasets (CIFAR-10, CIFAR-100, ImageNet-2000 ImageNet-lle 1k) and examining both near and far-OOD scenarios. For CIFAR-10/ 10/00/ (50k train 10kk test images each), near-OOD datasets are CIFAR-100/Tiny Imymmmgeeee,,,, and far-OOD are MNIST, SVHN, Textures, and Places365. For ImageNet-2200 (200 classes, 64x64 resolution), near-OOD datasets are SSB-hard/NINCO, and far-OOD are iNaturalist, Textures, and OpenImage-O; ImageNet-1k shares these OOD datasets. Regarding configuration, we deploy ResNet-18 for CIFAR-10/100 and ImageNet-200 using pre-trained checkpoints from OpenOOD for consistency, testing with three distinct seeds for robustness. For ImageNet-lk, we apply pre-trained torchvision models (RosNet-50. VTT-B-16, Swin-T) to explore GROOD's effectiveness in a broader context than OpenOOD v1 Yang et al. (022). To allow for reproducibility and facilitate further research, the complete code, including training and evaluation scripts, is available at: https://gittub. cow
Experimental Sctup
-ware--00D-etecction
For CIFAR-10/100 and ImageNet-2001 we train ResNet-18 models for 100 epochs using SGD with momentum 0.9, weight decay 5e-4, cosine learning rate decay (starting from 0.1), and batch sizes of 128 (CIFAR) and 256
9

---

Published in Transactions on Machine Learning Research (09/2025)
(Image:Net-200) For ImageNet-1K, we use pretrained models from torchvision (ResNet-50, ViT, Swin). When fine-tuning is required, we follow the OpenOOD v1.5 protocol (Zhang et al. 2023a with 30 epochs, learning rate 0.001, and batch size 256.
Table 2: Main results from OpenOOD v1.5 on standard OOD detection (AUROC). GROOD using synthetic OOD data (S 5.2) shows superior results compared to existing baselines.
CIFAR-10
CIFAR-100
ImageNet-200
ImageNNet-1K
Ars: (85)
56.00% 200
26.18%
NCP Ace. (90)
71.38%
Methool
NoaDDDD (96)
Fan-OD (58)
Now-OOD (96)
PisOOD (8)
Nene-ODD (K)
Fe-DO (95)
Nice--OO1 (95) 1
Fa-OOD (56)
Mu Bendakk &
2015
67.62% (20:3))
(...2% (...9)
(..300 at.
70. 70.68%
50.22 50.27%
90 00.20% (59
74.77%
80 80.2655
MSP
3716
88.08%
90.75%
80.27%
77.76%
83.54 68.54%
90.13%
70.01295
85.2555
ODIN
Laanx cE
2013
82.87%
87 0670
79,9055
70, 25.25
51.27%
91.71%
74.75%5
80.4750
MT3
84 201
89 72%
58 0555
50%
61. 1..00%
74.725 74.725,2203
05.145%
74. 24,2555
80.91
90. 230
07%
HoAd
61.87% pas
92 14)
77.085%
90. 6756
DICT
3mm
78.39% (
355
90 50% (30.333
73.07%
0555
Goal
Naati Finiir
2021
54 90%
57 60%
70.155
60.
72. 12.755%
84.26%
72.9699
90. 2556
MLS
Heedby
8T 02.52%
91. 107
St. (155
70. 67%
82 5000
81.11%
75. 7075
80, 5755
VIM
88.05%
03 16%
74 15%
78 68.8%%
91 10.055
72 01%
07. 0895
KNN
20.54)
85. c00.21
1896
81.54% (m
0252 1g
50 es
89 en
73.7896
00.0255
ASH Diaray
(5.277 1.04)
10% (2.59)
78.20 a8..00
80. 33.88% 2203
89 (0777
18. 78.1799
96.
GAIX 10ln 21
85.1% 15.1%
92 1581199
70.75%
86, 25
75. 1igusst
06.9899
50.295
CHDEE
H1
50.7% 90.7%
94.7%
s0) 40%
80 80.0899:a1.77
50. 02.65%
08. 68.49%
92.18855
GEN
T
21:33
01 (1
70 (89088
82 82.9%
91 10.30%
76.8559
80 761
1% 20332
79.85%
84.2%
11.20% 105
08.7%6:nm155
78.0%
95.85%
GROOD (Uurs)
91. 01.16% (c3)
78.95%
$4.44%
68.44)
92. (2.192)
78.91%
94.8
Main Results Discussion GROOD shows strong performance across datasets, but performance varies depending on the trade-off between Near and Far-OOD detection. On CIFAR-100, GROOD achieves state- of-the-art Far-OOD AUROC (84.44%) among post-hoc methods and competitive Near-OOD performance (78.9%). While some methods like VIM (Wang al. 2022) (81.70%) report higher Near-OOD scores, they trade off Far-OOD robustness.
On TmageNet-11, 1k, GROOD achieves top Far-OOD score (94.8%) but lower Near-OOD score (78.91%), whereas CombOOD (Rajasckaran et al. 2024) yields 95.22% Near-OOD and 90.24% Far-OOD.
These results reflect a key characteristic of GROOD: its effectiveness depends on the structure of the ID feature space. As GROOD relies on geometric separation of class prototypes (inspired by Neural Collapse (Pa- pyan al. 2020 ) its performance can degrade when ID reprosentations are less well-clustered. Additionally, the choice of OOD protolype impacts this trade-off. For example, using an "ID-corrupted val" prototype improves Near-OOD AUROC to 80.27% (CIFAR-100) and 83.5% (ImageNet-1kk) while maintaining strong Far-OOD scores.
Importantly, many lop-performing methods on the OpenOOD leaderboard require access to OOD data (e.g.. OE, CIDER). GROOD remains fully post-hoc and training-free making it more practical for deployment across varied scenarios.
Table Performance comparison (AUROC %) on Image 1K using different architectures.
ViT-B-16
Swin-T
Method
Near-OOD (%) f
Far-OOD (%) 1
Near-OOD (%) 1
Far-OOD (%) 1
GROOD (OURS)
76.47%
90.84%
76.10%
88.90%
ReACT Sun et al. 2021b
69.26%
85.69%
75.64%
88.23%
GradNorm Huang et al.
2021b
39.28%
41.75%
47.58%
35.47%
KNN Sun et al.
2022
74.11%
90.60%
71.62%
89.37%
ASH Djurisic et al. 2222
53.21%
51.56%
46.47%
44.64%
Performance on Transformer Architectures Further demonstrating the robustness and generaliza- tion capabilities of our approach, table 3 presents the OOD detection performance on ImageNet- 1K us- ing Transformer-hasedd architectures, ViT-B-16 (Dosovitskiy et al.) 2020: and Swin-T (Liu et. al. 2021b)
10

---

Published in Transactions on Machine Learning Research (09/2025)
GROOD maintains strong performance, achieving the top AUROC scores for both Near-OOD and OaD detection on ViT-B-16 (Dosovitskiy et al. 2020), and the best Near-OOD score on Swin-T (Liu et al.) 2021b) while being highly competitive for Far-OOD. This contrasts significantly with several other methods, such as GradNorm and ASH, whose performance severely degrades on these Transformer architcctures compared their ResNet-based results. This suggests that. GROOD's mechanism, relying on gradient sensitivily rel- ative to class and OOD prototypes, generalizes more effectively across fundamentally different architectural paradigms than methods potentially more sensitive specific CNN feature properties.
6.1 Ablation Studies
To understand the contribution of each component in GROOD, conduct series of ablation studies on CIFAR-10 (table E Each study isolates a key design choice and quantifies its impact on both near-OOD and far-OOD detection performance.
Table 4: Ablation study using different losses and OOD scores to show the effectiveness of each proposed part. Evaluation done CIFAR-10.
AUROC (%)
Model Variant
Far-OOD
Near-OOD
(1) Distance to the Noise prototype
84.3(-6.1)
79.9(+
(2) Gradient L1-norm only
92.4(10.48)
89.35
(3) Grads. wrt class prototypes
(2.0(1))11))
89.9(40.05)
(4) OOD prototype with uniform noise only
(1.7(-0.0)
88. (8.1(+0.55)
GROOD
(3.02)
91.16(20.001)
Distance vs. Gradient-based Scoring Our first experiment examines whether the gradient computation is truly necessary. We compare directly using the distance to the OOD prototype against full gradient- based approach. The significant performance gap (79.9% 91.16% for near-OOD and 84.3% vs 93.8% for far-OOD) demonstrates that gradients capture richer information about sample distribution than raw distances alone.
Nearest Neighbor vs. Gradient Norm While prior work like GradNorm Huang et al. (022b)) uses Ll-norm of gradients as the OOD score, we hypothesized that our full approach, GROOD, would be more informative. The results support this: GROOD achieves 93.8% AUROC on far-OOD detection and 91.16% on near-OOD detection compared to 92.4% and 89.35% respectively with gradient norm alone, suggesting that the combination of our design choices in GROOD provides valuable signal beyond the magnitude of the gradient alone.
OOD vs. Class Prototypes A natural question whether we need dedicated OOD prototype at all could we achieve similar results using gradients with respect class prototypes? The experiment shows that OOD-specific prototypes provide superior performance (93.8% 92.7% far-OOD and 91.16% 89.9% on ncar-OOD); validating our design choice to explicitly model out-of-distribution behavior.
Impact of Noisc Sources Finally, we investigate the value of our synthotic OOD data generation for OOD prototype construction compared to simply using uniform noise. Using only uniform noise degrades performance by 2.1% far-OOD (93.8% vs 91.7%) and 3.06% near-OOD detection (91.16% vs 88.1%), respectively, demonstrating the benefit of our comprchensive synthetic approach to prototype construction over basic uniform noise.
These ablations collectively validate GROOD's key design choices: each component contributes meaningfully the final performance, with the full method achieving the best results across all motrics. The consistent improvements and low standard deviations (< 0.6%) across experiments indicate the robustness of our approach.
11

---

Published in Transactions on Machine Learning Research (09/2025)
6.2 Robustness to Checkpoint Choice
Table 5: Standard Deviation of AUROC for the Last 15 Epochs on CIFAR-100
Method
Std (Far OOD)
Std (Near OOD)
MDS
Lee et al. (2018)
1.05
0.24
ODIN
Liang el al. (2018
0.40
0.22
Grad Norm Huang
2021b
0.62
0.72
VIM Wang et al. 2022
0.95
0.37
GROOD
0.38
0.2
Method
Method
90
GRADNORM
90-
GRADNORM
GROCD
GROOD
MDS
80
80-
70-
40-
40-
Epoch
Epoch
(a) Near-OOD AUROC
(b) Far-OOD AUROC
Figure AUROC Performance on C0far100 (Near and Far OOD) across different checkpoints showing the stability of GROOD
The AUROC metric, while widely used for evaluating OOD detection, exhibit instability during training, particularly in the later stages. This instability means that small fluctuations in the model's weights can lead to significant variations in AUROC scores, making the selection an optimal checkpoint challenging. The AUROC curve can vary sharply, even when the test error is relatively stable, indicating a sensitivity to minor weight perturbations.
contrast, GROOD's design contributes to more stable OOD detection performance. The key intuition behind GROOD's robustness lies in its focus on the sensitivity of weights relative to the OOD prototype. Throughout training, while the representation space and the OOD prototype's absolute location change as the network's weights are updated, their inherent relationship the sensitivity remains stable, leading to consistent OOD detection, as further evidenced by the reduced standard deviations shown in table and fig. 3
Further ablation experiments and detailed analysis are provided the Appendix.
7 Discussion and Conclusion
In this work, we introduced GRadient-aware Ou--Of-iistribttion detection (GROOD), novel approach that combines gradient information with distance metrics improve detection of OOD samples in DNN- based image classifiers. Extensive experiments across benchmarks show that GROOD effectively detects both near and far OOD samples, performs robustly across architectures and datasets, and requires little hyper- parameter tuning, making it practical for meployment. in real-world settings [Litjens et. al. 2017 Bojarski
et al. 2016
GROOD is particularly well-suited to scenarios where in-distribution features form clear clusters, consistent with the Neural Collapse phenomenon (Papyan al.] 2020). In such cases, deviations from prototypes
12

---

Published in Transactions on Machine Learning Research (09/2025)
are easily detected. However, its performance may degrade when in-distribution data is noisy or poorly separated.
From a practical perspective, GROOD improves inference speed compared to KNN-based methods (see ap- pendix A.4), but storing and processing gradients can be costly for very large datasets or high-resolution images. Prototype construction also matters: while relatively robust, performance can depend on the diver- sity of auxiliary 001) samples (appendix A.2
Finally, several design choices proved important. Proximity-based filtering of synthetic prototypes ($ 5.2 enhanced discriminative power, and mixup toward the second-highest predicted class yielded stronger results than random interpolation, likely because it produces harder boundary samples.
In summary, GROOD offers a simple and effective framework for OOD detection, especially when in- distribution data is well-structured. Future work could extend it to noisier domains and explore ways further roduce computational overhcad.
Acknowledgments
This work was carried out within the DEEL project. It is supported by the DEEL Project CRDPJ 537462-18 funded by the Natural Sciences and Engineering Research Council of Canada (NSERC) and the Consortium for Research and Innovation in Aerospace in Québec (CRIAQ), together with its industrial partners Thales Canada inc, Bell Textron Canada Limited, CAE inc and Bombardier inc _ The DEEL project is also part of IRT Saint Exupéry and the ANITI AI cluster The authors acknowledge the financial support from DEEL's Industrial and Academic Members and the France 2030 program Grant agreements P-AN--1-AARRA and n SERR-2-IAACL-OOS infrastructure. We would also like to thank Dr Samer Nashed for his fruitful discussions and valuable feedback during the review process.
We are grateful for the digital alliance of Canada and NVIDIA for compute
References
Martin Arjovsky, Léon Bottou, Ishaan Gulrajani, and David Lopez-Paz. Invariant Risk Minimization. CoRR, abs/1907.02899, 2019. URL http::/aaxii. org/abs/190// 02893
Abhijit Bendale and Terrance F. Boult. Towards Open Set Deep Networks. CoRR, abs/ abs/1511.06233, 2015.
URL http://aaxxvoorrr//b/55111...00 06233
Mariusz Bojarski, Davide Del Testa, Daniel Dworakowski, Bernhard Firner, Beat Flepp, Prasoon Goyal, Lawrence D. Jackel, Mathew Monfort, Urs Muller, Jiakai Zhang, Xin Zhang, Jake Zhao, and Karol Zieba. End to End Learning for Self-driving Cars. CoRR, abs/ Abs/1604.07316, 2016. URL http::/arxiv. 1604.07316
Jinggang Chen, Junjie Li, Xiaoyang Qu, Jianzong Wang, Jiguang Wan, and Jing Xiao. GALA: Delving into Gradient-based Attribution Abnormality for Out-of-distribution Detection. In Alice Oh, Tristan Naumann, Amir Globerson, Kate Saenko, Moritz Hardt, and Sergey Levine (eds.), Advances in Neural Information Processing Systems 36: Arnual Conference on Neural Information Processing Systems 2023, NewrIPS 2023, New Orleans, LA, USA, December 10 16, 2023, 2023. URL ltttp://paperr wwwppapprrrniis..commm Awtrrr---tttttt--ootae Cestrract-Conffeenncc..o html
paper wwwes//pppeeee//222.
Xingyu Chen, Xuguang Lan, Fuchun Sun, and Nanning Zheng. Boundary Based Out-of-distributiion Classifier for Generalized Zero-shot Learning. CoRR, abs/2008.00872 2020. URL https://arxiv.orr
abs/2008.044 04872
CK Chow. On optimum recognition error and reject tradeoff. JEEE Transactions on Information Theory, 16(1):41-46, 1970.
http:://deel.queeer https://4wx.del...
13

---

Published in Transactions on Machine Learning Research (09/2025)
Corinna Cortes and Vladimir Vapnik. Support-vector Networks. Mach. Learn., 20(3):273 -97, 1995. doi: 1001
10.1007 N..007//FF0994008. URL htttps::////.ooooo /ttp://.....1110...0000//0900030
Andrija Djurisic, Nebojsa Bozanic, Arjun Ashok, and Rosanne Liu. Extremely Simple Activation Shaping for Out-of-disstribttion Detection. CoRR, abs hats//220.09955 2022. doi: 10.48550/ Aww.......00000....22 2209.09858. URL
https://abi.org// 485.000/55500000...... 2209.
Alexcy Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Un- terthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale. CoRR, abs/2010.11929, 2020. URL https:// wwwpaiv..rr//a///0000022222
Matthijs Douze, Alexandr Guzhva, Chengqi Deng, Jeff Johnson, Gergely Szilvasy,
Mazaré, Maria Lomeli, Lucas Hosseini, and Hervé Jégou. The Faiss library. CoRR, abs/ 0is//2001.8222 2024. doi: 10.48550/ ARXIV 2401.888..... httpt:///////... htt////....rr11110088885///// 2401. 2401.08281,
John C. Duchi and Hongseok Namkoong, Learning Models with Uniform Performance via Distributionally Robust Optimization. CoRR, abs/ bbs/1180008750, 2018. URL httpp://aarx.v..ogabbb/////s//// 08750
Giorgio Fumera. and Fabio Roli. Support Vector Machines with Embedded Reject Option. In Seong- Whan Lee and Alessandro Verri (eds.). Pattern Recognition with Support Vector Machines, First International Workshop, SVM 2002, Niagora Falls, Canada, August 10, 2002, Proceedings, volume 2388 of Lecture Notes in Computer Science, pp. 68-82. Springer, 2002. doi: 10.1007 1-000777-5-004466--111 7/doi. wwt.:o.gg.101. 000g/10.10073-550-466666
6. URL https:
Yarin Gal and Zoubin Ghahramani. Dropout Bayesian Approximation: Representing Model Uncertainty in Deep Learning. CoRR, abs/1500.02142,, 2015. httpp://aaariii.rrrrbb////B/
lan J. Goodfellow, Yoshua Bengio, and Aaron C. Courville. Deep Learning. Adaptive computation and machine learning. MIT Press, 2016. ISBN 262-0-66---3.61-3 URL http:p::/wwwwddellaariiiggbgaboa org/
Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q Weinberger. On Calibration of Modern Neural Networks. CoRR, abs/ 0ts//706.045999 2017. URL http://arxiv hwwg//bs/1706..o 04599
Hany Hassan, Mostafa Elaraby, and Ahmed Y. Tawfik. Synthetic Data for Neural Machine Translation of Spoken-dialects. In Sakriani Sakti and Masao Utiyama (eds.), Proceedings of the 14th International Conference on Spoken Language Translation, IWSLT 2017, Tokyo, Japan, December 14-15, 2017, pp. 82- 89. International Workshop on Spoken Language Translation, 2017. URL https://aclanthoolgg. org/
2017 iisslt-1.12
Dan Hendryeks and Thomas G. Dietterich. Benchmarking Neural Network Robustness to Common Corrup- tions and Perturbations. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenKeview.net, 2019. URL httpp::/ppperrrrsss.ntfffftttttt HJz6tiCqYm
Dan Hendryeks and Kevin Gimpel. A Baseline for Detecting Misclassified and Out-of-distribation Examples in Neural Networks. CoRR, abs/1610.02136, 2016. URL
Dan Hendrycks, Steven Basart, Mantas Mazeika, Andy Zou, Joseph Kwon, Mohammadreza Mostajabi, Jacob Steinhardt, and Dawn Song. Scaling Out-of-distribution Detection for Real-world Settings. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvári, Gang Niu, and Sivan Sabato (eds.), International Conference on Machine Learning, ICML 2022, 17-23 July 2022, Baltimore, Maryland, USA, volume 162 of Proceedings of Machine Learning Research, pp. 8759 8773. PMLR, 2022. URL. https: html
//proceedings. mwlpiiiiinnmmi..m...mmmmm.mmeemm wttp:////1////eeerrreeseeeeeeeee
Yen-Chang Hsu, Yilin Shen, Hongxia Jin, and Zsolt Kira. Generalizod ODIN: Detocting -fiso--dist Image without Learning from Out-of-distribution Data. CoRR, abs/2002.11290 2020. URL https:
wttrxiv.orr//bs/2002.2. 11297
14

---

Published in Transactions on Machine Learning Research (09/2025)
Haiwen Huang, Zhihan Li, Lulu Wang, Sishuo Chen, Xinyu Zhou, and Bin Dong. Feature Space Singularity for Out-of-distributio Detection. In Huáscar Espinoza, John A. McDermid, Xiaowei Huang, Mauricio CesttilloEffen,, Xin Cynthia Chen, José Hernández- Orallo, Seán Ô hEigeartaigh, and Richard Mallah (eds.), Proceedings of the Workshop on Artificial Intelligence Safety 2021 (SafeAI 2021) co-located with the Thirty- Fifth AAAT Conference on Artificial Intelligence (AAAT 2021), Virlual, Febrwary 8, 2021, volume 2808 of CEUR Workshop Proceedings. CEUR-WS.org, 2021a. URL https://ceur-wa hotp:////euuwsoooo/oooo-------
7. 7.pdf
Rui Huang, Andrew Geng, and Yixuan Li. On the Importance of Gradients for Detecting Distributional Shifts in the Wild. CoRR, bbss/210000018, 2021b. URL https://arxiv, httrp:://arai..org//b////////// 00218
Conor Igoe, Youngseog Chuung, Ian Char, and Jefs Schneider. How Useful are Gradients for OOD Detection Really? CoRR, abs/ (0bs/2220..1000 2022. doi: 10.48550/ 10.48550/ARXIV ARXIV 22051.202205.114333 URL https://doi.
arXiv. 2205 10439.
Konstantin Kirchheim, Marco Filax, and Frank Ortmeier. PyTorch-OOD: A Library for distofiiisti Detection based on PyTorch. In IEEE/CVE /CFF Conference on Computer Vision and Pattern Recogni- lion Workshops, CVPR Workshops 2022, New Orleans, LA, USA, June 19-20, 2022, pp. 4350 4359. IEEE, 2022. doi: 10. 10.109/CVVRW556AA.202200.. 2022. 00481
URL https:///doi.org/10 1110/1../111////155544151
Shu Kong and Deva Ramanan. OpenGAN: Open-set Recognition via Open Data Generation. CoRR, abs/2104.02939, 2021. URL fttps:://axxiv.rr//abba.. 02939
Vignesh Kothapalli, Ebrahim Rasromani, and Vasudev Awatramani. Neural Collapse: A Review on Mod- elling Principles and Generalization. CoRR, hbbs/220.00444/ 2022. doi: (.48550/ARXII 220..04400 URL https:://oi.orst org/ 48550/arXiv. www.a..www...........aaaa....... 2206.04041
Alex Krizhevsky, Πya Sutskever, and Geoffrey E. Hinton. ImageNet Classification with Deep Convolutional Neural Networks. In Peter L. Bartlett, Fernando C. N. Pereira, Christopher J. C. Burges, Léon Bottou, and Kilian Q. Weinberger (eds.), Advances in Newral Information Processing Syslems 25: 26th Annual Conference on Neural Information Processing Systems 2012. Proceedings of a meeting held December 3-6, 2012, Lake Tahoe, Nevada, United States, pp. 1106-1114, 2012. URL htppss/cc/// www.e/dnnnnnnnnnus......muu cc/ httpp///w0./aaa./////a/aaaa/eee.
Yann LeCun, Yoshua Bengio, and Geoffrey E. Hinton. Deep learning. Nat., 521(7553): 444, 2015. doi:
N0TT//NATEE1443... URL https://doi. wrroooo..orr//// org/10.. 100.1000//tture45550
Jinsol Lee and Ghassan AlRegib. Gradients as a Measure of Uncertainly in Neural Networks. CoRR,
200000000,0000, 2020. URL https://arxii..o org/ httgg/abs20008..o 08000
Jinsol Lee, Mohit Prabhushankar, and Ghassan AlRegib. Gradient-based Adversarial and Out-of-distrributio URL https://doi..rr//00
Detection. CoRR, abs/ /0///2266000 2205.00855, 2022. doi: A8855//A0AI.....2 www.:I...22...00 2206.08255.
48550/arXiv. 2206. 2225508255.....
Kimin Lee, Kibok Lee, Honglak Lee, and Jinwoo Shin. A Simple Unified Framework for Detecting Out-
of-distribution Samples and Adversarial Attacks. CoRR, hts///177.0888.111 191, 2018. URL http:
//arxiv. abs/////..../////////// 00088
Shiyu Liang, Yixuan Li, and R. Srikant. Enhancing The Reliability of Out-of-distribattio Image Detection Neural Networks. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30- May 3, 2018, Conference Track Proceedings. OpenReview.nee, 2018. URL https:
//openreview wwwaurvviewnnet/forreee
Geert Litjens, Thijs Kooi, Babak Ehteshami Bejnordi, Arnaud Arindra Adiyoso Setio, Francesco Ciompi, Mohsen Ghafoorian, Jeroen A. W. M. van der Laak, Bram van Ginneken, and Clara I. Sánchez. A Survey on Deep Learning in Medical Image Analysis. CoRR, abs/1702.057477, 2017. URL http:://axiv..o/
abs/ 1702.057477777
15

---

Published in Transactions on Machine Learning Research (09/2025)
Jiashuo Liu, Zheyuan Hu, Peng Cui, Bo Li, and Zheyan Shen. Heterogeneous Risk Minimization. CoRR, wttp://wwwrrg/bb//.....oo.
abs/2105.038188 2021a. URL
Litian Liu and Yao Qin. Fast decision boundary based arXiv:2312 11536, 2023.
detector. arXiv preprint
Litian Liu and Yao Qin. Detecting out-of-distribution through the lens of neural collapse. In Proceedings of the Computer Vision and Pattern Recognition Conference, pp. 15424 15433, 2025.
Weitang Liu, Xiaoyun Wang, John D. Owens, and Yixuan Li. Energy-based Out-of-distribution Detection. CoRR, abs/2010.03759, 2020. URL https://arxiv http://axxivv.o/abbb/.s///a org//br////a///aoo 03775 03759
Xixi Liu, Yaroslava Lochman, and Christopher Zach. GEN: Pushing the Limits of Softmax-based Out-of-distribution Detection. In IEEE/CVF Conference Computer Vision and Pattern Recogni- tion, CVPR 2023, Vancouver, BC, Canada, June 17-24, 2023, pp. 23946 23955. IEEE, 2023. doi: 10.1109/CVPR52729.020 2ww.:227....22..22222 2023.02293, URL https:///oo... org/10. 1199/CVPR52299 2023. 022993..
Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin Transformer: Hicrarchical Vision Transformer using Shifted Windows. CoRR, abs/2103.14030, 2021b. 14030
URL attpp:://arxiv.org//aett
TorchVision maintainers and contributors. Torchvision: Pytorch's computer vision library. https /ttpps//github.
com/pytorcchviiior 2016.
Tomás Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. Efficient Estimation of Word Representations in Vector Space. In Yoshua Bengio and Yann LeCun (eds.), 1st International Conference on Learning Representations, ICLR 2013, Scottsdale, Arizona, USA, May 2-4, 2013, Workshop Track Proceedings, 2013. URL htttp://arxiv.ooo org/ www./bs/////oo//.ooooo..o... 1301.3781
Yifei Ming. Yiyou Sun, Ousmanc Dia, and Yixuan Li. How to Exploit Hyperspherical Embeddings for Out- of-distribution Detection? In The Eleventh International Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023. OpenReview net, 2023. URL attpps///pearrriiee.eet/tte
id=aEPaEOW5pAd
Anh Mai Nguyen, Jason Yosinski, and Jeff Clunc. Deep neural networks are casily fooled: High confidence predictions for unrecognizable images. In IEEE Conference on Computer Vision and Pallern Recognition, CVPR 2015, Boston, MA, USA, June 7-12, 2015, pp. 427-436 IEEE Computer Society, 2015. doi: 10.1109/ CL.1109/CVPR.CC CCW..CV........66...... URL https: org/10..100 1109/CVPR. 2015. 7298640
Paul Novello, Yannick Prudent, Corentin Friedrich, Yann Pequignot, and Matthieu Le Goff. OODEEL, simple, compact, and hackable post-hoc deep OOD detection for already trained tensorflow or pytorch image classifiers.
wwtoo//eeeaaa/eee aiooeeell 2023.
Vardan Papyan, X. Y. Han, and David L. Donoho. Prevalence of Neural Collapse during the terminal phase of deep learning training. CoRR, abs//208..08186 2020. URL
08186
Magesh Rajasekaran, Md Saiful Islam Sajol, Frej Berglind, Supratik Mukhopadhyay,, and Kamalika Das. Combood: A semiparametric approach for detecting out-of-distribution data for image classification. In Proceedings of the 2024 SIAM International Conference Data Mining (SDM), pp. 643-651. SIAM, 2024.
Jie Ren, Stanislax Fort, Jeremiah Z. Liu, Abhijit Guha Roy, Shreyas Padhy, and Balaji Lakshminarayanan. A Simple Fix to Mahalanobis Distance for Improving Near-OOD Detection. CoRR, hts/2106.09022. 2021. URL pttttpp://aaxii.orrr/bbbb.
Chandramouli Shama Sastry and Sageev Oore. Detecting Ofttoff-dittiibution Examples with Gram Matrices.
In Proceedings of the 37th International Conference on Machine Learning, ICML 2020, 19-18 July 2020, Virtual Event, volume 119 of Proceedings of Machine Learning Research, pp. 8491-8501, PMLR, 2020.
URL http::/proceedingg mlr, wwt.:/prresssaasssseeeeee html
16

---

Published in Transactions on Machine Learning Research (09/2025)
Zheyan Shen, Peng Cui, Tong Zhang, and Kun Kuang. Stable Learning via Sample Reweighting. CoRR, abs/1911.12580, 2019. URI. http::/arxxv..rg///
12580
Karen Simonyan and Andrew Zisserman. Very Deep Convolutional Networks for Large-scale Image Recog- nition. In Yoshua Bengio and Yann LeCun (eds.), 3rd International Conference on Learning Represen- tations, ICLR 2015, San Diego CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015. URL
http://arxiil .ww. abs/ 1009/ 1556
Yue Song, Nicu Sebe, and Wei Wang. RankFeat: Rank-1 Feature Removal for Out-of-distrribttion Detection CoRR, abs/2209.088 085900, 2022. doi: 10.48550/ARIV..22000 2209.08590. URL https://dbi.orr//1..ee
DeXiv.2209.000
Jingbo Sun, Li Yang, Jiaxin Zhang, Frank Liu, Mahantesh Halappanavar, Deliang Fan, and Yu Cao. pradient-based Novelty Detection Boosted by Self-supervised Binary Classification. CoRR,
abs/2112.09815, 2021a. URL https://arxiv. hwtp://ggg//bb////eeeeeeeee http//bb//22.../..322 09815
Yiyou Sun and Yixuan Li. DICE: Leveraging Sparsification for Out-of-distributtin Detection. In Shai Avidan, Gabriel J. Brostow, Moustapha Cissé, Giovanni Maria Farinella, and Tal Hassner (eds.), Computer Vision ECCV 2022: 17th European Conference, Tel Aviv, Israel, October 23-27, 2022, Proceedings, Part XXIV, volume 13684 of Lecture Noles in Compuler Science, pp. 691 708. Springer, 2022. doi: 40. URL https://doi.org: 100111100007778811 00177883-031---1 001-00053-333333 3_40
Yiyou Sun, Chuan Guo, and Yixuan Li. ReAct: Out-of-distribattion Detection With Rectified Activations. CoRR, abs/2111.12799, 2021b. URL hattaa//aarrvv.orr//a///1111111.
Yiyou Sun, Yifci Ming, Xiaojin Zhu, and Yixuan Li. Out-of-distributioo Detection with Deep Nearest Neighbors. CoRR, abs/2204.06500) 2022. doi: 10.48550/ / 2204.06077. URL httpt:tstsss.iorreeeerrrrr 10.
48550/arXiv. 220...224400000 2604006507
Engkarat Techapamurak, Masanori Suganuma, and Takayuki Okatani. Hyperparameterr-fee Out-of- distribution Detection Using Cosine Similarity, In Hiroshi Ishikawa, Cheng-Lin Liu, Tomás Pajdla, and Jianbo Shi (eds.), Computer Vision ACCV 2020 - 15th Asian Conference on Computer Vision, Ky- olo, Japan, November 30 December 4, 2020, Revised Selected Pupers, Part IV, volume 12625 of Lec- ture Notes in Computer Science, pp. 53 69. Springer, 2020. doi: 10.1007/977-33-00-66688- 4. URL /tt.///ooooro///00/ www.ooggg../... 1-0000/977---000-6538----8-8-88-
https://doi..rg::
Vikas Verma, Alex Lamb, Christopher Beckham, Amir Najafi, Ioannis Mitliagkas, David Lopez- Paz, and Yoshua Bengio. Manifold Mixup: Better Representations by Interpolating Hidden States. In Kamalika Chaudhuri and Ruslan Salakhutdinov (eds.), Proceedings of the 36th International Conference on Machine Learning, ICML 2019, 9-15 June 2019, Long Beach, California, USA, volume 97 of Proceedings of Machine Learning Research, pp. 6438 6447. PMLR, 2019. URL httpp///proceddings mlr press/v97/verma105 html
Haoqi Wang, Zhizhong Li, Litong Feng, and Wayne Zhang, ViM: Out- -fit----iittiittion with Virtual-logit Matching. CoRR, abbs/2203.10s 10807, 2022. doi: 10.48550/ARXIY (S5500/ARXIV.220800880 10807 URL https://doi, 10. 48550/arXi: 2203.222222222 10807
Jingkang Yang, Pongyun Wang, Dejian Zou, Zitang Zhou, Kunyuan Ding, Wenxuan Peng, Haoqi Wang, Guangyao Chen, Bo Li, Yiyou Sun, Xuefeng Du, Kaiyang Zhou, Wayne Zhang, Dan Hendrycks, Yixuan Li, and Ziwei Liu. Openood: Benchmarking generalized out-of-distribution detection. In Thirty-siath Conference on Neural Information Processing Systems Datasets and Benchmarks Track, 2022. URL https: //openreview. pateenrrvieev.eetfoouuiiiiiio..o pent//formmiidsgee
takUt
Alireza Zacemzadeh, Niccoló Bisagno, Zeno Sambugaro, Nicola Conci, Nazanin Rahnavard, and Mubarak Shah. Out-of-distribution Delection Using Union of 1-Dimensional Subspaces. In IEEE Confer- ence on Computer Vision and Pattern Recognition, CVPR 2021, virtual, June 19-25, 2021, pp. 9452-9461. Computer Vision Foundation TEEE, 2021. doi: 001100//VVR44447..20000 00933. URL https://openaccett thecvf http:////ootaattte///////////aae ott.aaaeeeettttoooiiiirrbboooooi Detection_Usine Union of 1-Dimmesiionll Subsaacessssppaaasaaaaaaaaa CVRpa__cc____________ wwl.pppprr.t.. html
17

---

Published in Transactions on Machine Learning Research (09/2025)
Jingyang Zhang, Jingkang Yang, Pengyun Wang, Haoqi Wang, Yueqian Lin, Haoran Zhang, Yiyon Sun, Xuefeng Du, Kaiyang Zhou, Wayne Zhang, Yixuan Li, Ziwei Liu, Yiran Chen, and Hai Li. OpenOOD v1.5: Enhanced Benchmark for Out-of-distribution Detection. CoRR, abs /20/ 09300, 2023a. doi: 10.
18550/ARXIV.2800 2ww.v..306..9000000 URL htttps://dot org/10. 48550/arXiv 2306 09301
Jinsong Zhang, Qiang Fu, Xu Chen, Lun Du, Zelin Li, Gang Wang, Xiaoguang Liu, Shi Han, and Dong- mei Zhang. Out-of-distribution Detection based In-distribution Data Patterns Memorization with Modern Hopfield Energy. In The Bleventh International Conference Learning Represenlations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023. OpenReeiew.net, 2023b. URL https://openrevieet wtwp:/twwiiee.eee/p..i.... net/pdf?id- KkazG41gKL.
A Appendix
A.1 GROOD Algorithm
For a comprehensive overview, the complete GROOD algorithm is outlined in algorithm and algorithm
Algorithm GROOD initialization: Compute protolypes and gradients for the training set.
Require:
Training set Din trained model
Require: mixup parameter
1:
Compute class prototypes P early and P Ppen
D. eq.
2: Compute OOD prototype Pood using synthetic data generationS 5.2
D> eq.
function COMP COMP_GRAD(h,, p pen
pen)
C
4: compute (H)
P eq. 5
using P py= C P oood
return (H))
end function
for each x E Din do
8: (zz) COMP GRAD (h(r), pee py .c P pen
end for
early 10: return (V(r))eED... Py=1. p py C+ ond
pen
Algorithm 2 OOD score using GROOD
Require: Training dataset Din trained model f
Require: (a(r)))eEP.., pen
.c: P pen from GROOD initialization
Require: function COMP BRM_GRRA (in Alg. I
Require: Sample Tnew, threshold
(IInew) = COMP CRAD(H((Enw)) pep 1.....C peen
Compute OOD score using Nearest Neighbor search: S(xnew) = mingep,,
V (Zneww - V(x)
3: return ID n(nnew) < else OOD
A.2 Choice of OOD data for OOD prototype computation
OpenOOD Val To form p pen we selected 100 data points from auxiliary OOD validation dataset, per the OpenOOD framework Zhang et al. (2023a); Yang et al. (2022), ensuring no category overlap with test set images. This selection criterion aligns with practices in established post-hoc analyses Lee el al. 2002 2018); Kong Ramanan (2021). Our method demonstrated robustness to the specific choice of OOD samples. An investigation with five distinct sets of 100 OOD validation samples each revealed negligible variation in AUROC, with maximum standard deviation of 0.5%, underscoring our approach's stability across different OOD selections.
18

---

Published in Transactions on Machine Learning Research (09/2025)
Table 6: OOD Detection Performance (AUROC %) by Dataset and OOD Prototype Construction Method.
Cifar-10 10
Cifar-100
ImageNNet2200
ImageNet
OOD Prototype
Near-OOD
Far-OOD
Near-OOD
Far-OOD
Near-OOD
Far-OOD
Near-OOD
Far-OOD
Syuthetic OOD
91.16
93.8
78.9
84.44
83.4
92.19
78.91
94.8
ID- Corruptt Val
90.55
93.88
80.27
81.41
83
92.58
83.5
94.6
OpenOOD Val
91.01
94.18
80.92
80.7
81.86
94.77
78.05
96.16
Uniform
90.9
94.1
77.26
84.5
94.46
75.23
94.55
Mean of Prototypes
88.5
91.4
77.2
81.4
82.3
92.9
71.25
82.21
ID-Corrupted Val We further validated approach using 100 i.i.d. samples from CIFAR-10- C Hendrycks & Dietterich (2019) for CIFAR-10 as ID and CIFAR-100C for rest of ID datasets including CIFAR-100, ImageNet-200 and ImageNet to ensure no possible overlap or leaks to the test set.
Uniform We try to approximate the representation of OOD data by leveraging uniform noise data. Ini- tially, a batch of random noise images is created using uniformly distributed pixel values across all channels. These noise images are then passed through a neural network to extract logits and features from intermediato layers. An energy score is computed for each image, where lower scores indicate a higher likelihood of being OOD. The images with the lowest energy scores, which are most similar are selected, and their penultimate layer features extracted. These features are then aggregated to form OOD prototype.
dfstsiiibbttttii (OOD) data,
Synthetic OOD To simulate OOD data reprosentations, we utilize manifold mixup technique the early layer, similar to the targeted mixup approach described in $ 5 However, our method differs in the interpolation target. Instead of interpolating towards the predicted class prototype, we interpolate towards the second-highest predicted class (2, which is the closest incorrect class on the decision boundary.
Mean of Prototypes Instead of trying to approximate the representation of OOD data using auxiliary OOD data we rely on the mcan of ID prototypes.
Table illustrates our method's robustness to different validation OOD datasets.
A.3 Density Plots
To comprehensively evaluate the GROOD method's ability to distinguish between in-distribution (ID) and out-of-distribution (OOD) data, we visualize the distribution of OOD scores across a range of datascts with varying characteristics. Figure g presents these visualizations for ID, Near-OOD, and Far-OOD samples on CTFAR-10, CIFAR-100 (datasets with relatively small, natural images), ImageNet-200 (a subset of Tm- ageNet), and ImageNet-lk (a large-scale, complex dataset). Analyzing performance across this spectrum demonstrates GROOD's robustness to differences in image complexity and dataset size. In each subplot, use density plots to represent. the distribution of OOD scores, allowing for clear visual comparison of scparation between ID and OOD distributions.
A.4 Inference Speed
GROOD introduces novel Out-of-Distribution (OOD) detection method involving two forward passes for the mixup part which is inexpensive to compute, backward pass over the OOD prototype which can be computed using its closed form expression as in eq. (5) of the main paper and the arest neighbor search which is more computationally intensive. For the latter, Our approach employs the FAISS IndexIVF method for efficient distance computation, utilizing centroids and inverted lists instead of the complete dataset. This technique notably enhances inference speed compared to KNN, particularly in our CIFAR benchmarks. Specifically, on CIFAR-10 and CIFAR-100 datasots, GROOD recorded evaluation inference times over all OOD test sets of 130 seconds and 155 seconds, respectively. This is significantly faster than KNN, which took 434 seconds for CIFAR-10 and 641 seconds for CIFAR-100, rating the efficiency of our approach.
19

---

Published in Transactions on Machine Learning Research (09/2025)
(ifar13 (13)
difar100 (n)
000
OOD
0.70
020
Densiy
0.15
0.10
0.30
0.85
0.55
1.2
34
000
GOI
(a) CIFAR-10
CIFAR-100
imagenet200 (C))
0.30
Imagenet
0.25
Far COO
Far 000
0.20
0.06
Denaity
0.10
0.04
0.85
0.00
30
15
20
25
0
10
20
30
40
000 score
030 scote
(c) ImageNet-200
(d) ImageNet-Ik
Figure 4: Distribution of OOD scores on Near-OOD and Far-OOD across different datasets.
A.5
Ablate value of kth nearest neighbor
illustrates the impact of using the distance to the k-th nearest neighbor, as proposed by Sun et al.) The plot demonstrates that employing the distance to the nearest point in gradient space leads to optimal results.
Figure 2022).
A.6 Gradient computation in closed form
This section details the derivation of the closed-form expression for the gradient, as presented in eq. (5) of the main paper. The cross-entropy loss for a logit L (L,) + 1 and some (any) ID label y is given by:
exp(Tyy)
H(L
Eet exp(L,)
The partial derivative of this loss with respect to LC+1 is given by:
a C+LC++1)= exp(Lc+1) aLcH1
ΣCt exp(L.))
which equal the softmax probability corresponding to the OOD class and does not depend on the specific ID class label y anymore. Now for a feature vector h, the corresponding logit vector L(h) given
by eq. 22) Since Lo+1(1) (h) ||l [la- is the only logit depending pen the gradient of the above loss
20

---

Published in Transactions on Machine Learning Research (09/2025)
94
93
farood/AUROC
92
91
Far-OOD AUROC
Near-OOD AUROC
90
10
20
30
40
50
k
Figure 5: Ablating different values for k-th nearest neighbor parameter on CIFAR-10
with respect to pood given by the chain rule:
exp(Le++1)
P pood
P Pood
V pee H((()),)) H(L(h). v ponn L(h) = CC+ exp(L,) |/-
Pood (h)
aL
ped 2
||
pood
as desired.
A.7 Impact of Mixup-Trained Trained Backbones on GROOD
We investigate how GROOD's OOD prototype construction interacts with backbones trained using manifold mixup (Verma al. 2019). Since these models are explicitly trained generalize across interpolated samples, hypothesized that synthetic mixup-based OOD prototypes might no longer serve as an effective deviation reference.
Method
Ncar-OOD AUROC (%)
Far-OOD AUROC (%)
GROOD (mean prototype)
81.05
80.26
ASH (Duriisic et. al. 2022
79.1
56.0
KNN Sunn et al. 2022
78.0
81.85
GradNorm (Huang et al. 2021b
50.0
50.0
Table 7: Performance of GROOD with mean prototype on manifold mixup-trained ResNet-18 backbone (CIFAR-100).
To test this, we evaluated GROOD on a ResNet-18 trained with manifold mixup. Instead of using mixup- basod OOD prototypes since will no longer represent OOD data, we used mean prototype computed from ID class prototypes. The results are shown below:
These results show that GROOD maintains competitive performance by adjusting its prototype strategy to the model's training procedure. The mixup-based prototype remains optimal for standard-trained models, while alternative strategics like mean prototypes are preferable when the backbone is mixup-rogularized.
21


Reviews:
[{"review_id": "dY0q2INWCp", "reviewer": "Reviewer_7fnF", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "**Strengths**\n\nThe paper is clearly written and the proposed method is clearly presented and easy to follow.\n\nThe experimental settings are standard and the results show the strength of GROOD over a few baselines.\n\n\n**Weaknesses**\n\nIt seems that the performance of the method is not competitive compared with recent baselines particularly on CIFAR100 and ImageNet-1k, according to OpenOOD benchmark https://zjysteven.github.io/OpenOOD/.\n\nThe paper claims that “While real-world OOD samples exhibit considerable diversity, representing them with a single prototype proves effective within our gradient-aware framework.” It looks like the gradient distance is a unit vector with the length equal to confidence score. I don’t get why this vector can handle the diversity of OOD samples. The experiment looks good but the paper does not seem to explain what challenge the proposed method is handling and why quite well.\n\nThe GROOD method seems to favor the mixup-based prototype, but it is unknow how mixup training will affect the effectiveness of GROOD.", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "The paper proposes GROOD, a post-hoc OOD detection method leveraging the gradient of a nearest-class-prototype (NCP) loss with respect to an OOD prototype. GROOD is proposed based on the intuition that gradients derived from ID and OOD samples differ significantly in magnitude and direction, enabling better separation in the gradient space. It introduces synthetic OOD prototype generation via mixup and includes a thorough empirical analysis. GROOD avoids retraining, achieves high performance across several benchmarks and is demonstrated to generalize across architectures.", "claims_and_evidence_yn": "Yes", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "1. The current performance on CIFAR-100 and ImageNet-1k appears less competitive compared to several recent OpenOOD baselines. Please provide analysis to explain why GROOD may underperform on these datasets.\n\n2. Please provide a more detailed explanation or theoretical justification for why a single OOD prototype is sufficient to capture the diversity of real-world OOD samples, especially when GROOD assumes this for all test-time OOD detection. It would be more convincing if the OOD test data has multiple modes such as a Gaussian mixture model.\n\n3. The current presentation lacks in-depth analysis on what specific challenge GROOD is designed to solve compared to existing post-hoc or gradient-based OOD methods. \n\n4. Discuss the Role of Mixup training and Its Impact on test-time GROOD", "broader_impact_concerns": "Not applicable.", "additional_comments": "", "extra_scores": {}, "extra_text": {}}, {"review_id": "1drywPH880", "reviewer": "Reviewer_ZBKA", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "**Strengths:**\n\n- The idea is straightforward and easy to understand. The author provided sufficient context (albeit not well organized, see below) for readers.\n\n- Experiments are conducted on a wide range of datasets that follows the setting of previous works.\n\n\n**Weaknesses:**\n\n- Several design choices are not sufficiently explained or justified.\n\n  - In the intro (P2), the authors present two key observations that motivate GROOD. While these observations are relevant, their presentation feels abrupt and disconnected from the surrounding text. It may improve clarity to briefly summarize these insights in the Introduction and elaborate on them in the Methods section (Section 4.1). Rewriting this part to enhance logical flow would greatly improve readability.\n\n  - In Eq2, authors use the L2 distance between a sample and each prototype as the logit vector. This design choice is not clearly justified. Since Euclidean distance may not always reflect meaningful similarity in embedding space, alternative metrics like cosine similarity may be more appropriate. Clarification/experiments on why L2 distance was chosen is recommended.\n\n  - The proposed method relies on the construction of a single OOD prototype, as described in Figure 2 and Section 5.2. However, it is unclear whether OOD samples naturally form a coherent group. The assumption that a single prototype can represent diverse OOD samples may not hold, and the explanation in Section 5.2 does not adequately address why multiple OOD prototypes were not considered. A more detailed justification of this design would strengthen the paper.", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "This paper proposes Gradient-Aware Out-of-Distribution Detection (GROOD), a new OOD detection method inspired by neural collapse theory and prototype-based classification. The authors introduce an out-of-distribution prototype that serves as a fixed point for measuring the OOD degree of new samples. Experimental results demonstrate that GROOD outperforms existing methods in AUROC across a wide range of datasets.", "claims_and_evidence_yn": "Yes", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "- Please see weakness for a range of points that require clarification and improvement.\n\n- It seems like all the methods compared are published before 2023. It would strengthen the evaluation to include more recent methods or benchmarks.\n\n- While the availability of open-source code is appreciated, it would be helpful to include a clear textual description of the training and evaluation setup, such as number of epochs, learning rate schedule, and batch size, in the main paper or appendix.\n\n- Page 9, please fix the incorrect citation format of Yang et al. (2022).", "broader_impact_concerns": "N/A", "additional_comments": "", "extra_scores": {}, "extra_text": {}}, {"review_id": "TqbIOqWfXG", "reviewer": "Reviewer_zBtZ", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "**Strengths:**\n\n1. The proposed method is simple yet effective, achieving state-of-the-art performance on various benchmarks, especially on near-OOD tasks.\n\n2. It introduces an interesting application of neural collapse.\n\n3. The related work section is extensive and accessible to a general audience.\n\n4. The proposed method demonstrates deep connections to all existing paradigms.\n\nOverall, this paper is solid and does not have many weaknesses. However, there are a few areas for improvement:\n\n1. The paper appears to have deeper connections with existing paradigms, which should be discussed further to increase its impact. (Changes 1-3)\n\n2. More discussion of the design choices and experiments is needed. (Changes 4,5)", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "The paper introduces GROOD, a novel post-hoc method for out-of-distribution (OOD) detection that leverages an artificial OOD prototype in the feature space of a pre-trained deep neural network. By analyzing the gradients of a nearest-class-prototype loss with respect to this synthetic OOD prototype—instead of traditional gradients with respect to model parameters—GROOD effectively distinguishes between in-distribution (ID) and OOD samples, as OOD data exhibits greater sensitivity to changes in the OOD prototype. The method integrates insights from neural collapse, utilizes prototype geometry, and introduces a mixup-based approach for generating synthetic OOD samples, requiring no extra training or model modifications. Extensive experiments show that GROOD achieves superior OOD detection performance and robustness, especially for challenging datasets like ImageNet-1k, highlighting the benefits of combining feature and gradient space analyses in OOD detection.", "claims_and_evidence_yn": "Yes", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "1. Traditionally, neural collapse (NC) is often considered detrimental for OOD detection because it leads to overconfidence. However, this paper presents an interesting application of neural collapse. I believe this aspect deserves more discussion and should be highlighted in the paper.\n\n2. The proposed method is closely related to energy-based OOD detection methods. For example, equation (4) is essentially an energy function, and its gradient serves as a score function. Therefore, the connections with existing energy-based methods should be discussed, as well as whether the techniques proposed in this paper can be applied to other methods.\n\n3. The method is also related to feature-based approaches, particularly those using Mahalanobis distance and cosine similarity from class centroids. A discussion of these relationships is needed. Furthermore, can these distances replace the L2 distance in equation (2), and how would their performance compare?\n\n4. This paper employs synthetic OOD generation using mixup. However, this approach likely covers only a small subset of possible OOD samples and may lead to inaccurate estimation of the OOD prototype. How significant is the gap between synthetic OOD samples and the global oracle?\n\n5. An interesting observation from Figure 2(a) is that the OOD points are “inside” the ID points. Why does this occur?", "broader_impact_concerns": "No", "additional_comments": "", "extra_scores": {}, "extra_text": {}}]

Author rebuttal:

Decision: Accept (poster)