GROOD: GRadient-Aware Out-of-Distribution Detection

Mostafa ElAraby, Sabyasachi Sahoo, Yann Pequignot, Paul Novello, Liam Paull
12/22/2023
cs.CV

No official code found. Best implementation: mostafaelaraby/Gradient-Aware-OOD-Detection (1 star, MIT, last commit 2025-09-03).

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.

View on arXivView PDF

Code Implementations(1)

MIT

This repository contains the official implementation of "GROOD: Gradient-Aware Out-of-Distribution Detection," accepted at TMLR. GROOD is a novel method for OOD detection that leverages gradients of a nearest-class-prototype loss to distinguish between in-distribution and out-of-distribution data.

10Shell, Python1 years agoMIT

Similar Papers

Cite this paper

@article{elaraby2023grood,
  title  = {GROOD: GRadient-Aware Out-of-Distribution Detection},
  author = {Mostafa ElAraby and Sabyasachi Sahoo and Yann Pequignot and Paul Novello and Liam Paull},
  year   = {2023},
  eprint = {2312.14427},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.14427v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.14427.svg)](https://codeofpaper.com/paper/2312.14427)

Discussion