Low-Dimensional Gradient Helps Out-of-Distribution Detection

Yingwen Wu, Tao Li, Xinwen Cheng, Jie Yang, Xiaolin Huang
10/26/2023
cs.CV

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Detecting out-of-distribution (OOD) samples is essential for ensuring the reliability of deep neural networks (DNNs) in real-world scenarios. While previous research has predominantly investigated the disparity between in-distribution (ID) and OOD data through forward information analysis, the discrepancy in parameter gradients during the backward process of DNNs has received insufficient attention. Existing studies on gradient disparities mainly focus on the utilization of gradient norms, neglecting the wealth of information embedded in gradient directions. To bridge this gap, in this paper, we conduct a comprehensive investigation into leveraging the entirety of gradient information for OOD detection. The primary challenge arises from the high dimensionality of gradients due to the large number of network parameters. To solve this problem, we propose performing linear dimension reduction on the gradient using a designated subspace that comprises principal components. This innovative technique enables us to obtain a low-dimensional representation of the gradient with minimal information loss. Subsequently, by integrating the reduced gradient with various existing detection score functions, our approach demonstrates superior performance across a wide range of detection tasks. For instance, on the ImageNet benchmark with ResNet50 model, our method achieves an average reduction of 11.15$\%$ in the false positive rate at 95$\%$ recall (FPR95) compared to the current state-of-the-art approach. The code would be released.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{wu2023lowdimensional,
  title  = {Low-Dimensional Gradient Helps Out-of-Distribution Detection},
  author = {Yingwen Wu and Tao Li and Xinwen Cheng and Jie Yang and Xiaolin Huang},
  year   = {2023},
  eprint = {2310.17163},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.17163v2}
}

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/2310.17163.svg)](https://codeofpaper.com/paper/2310.17163)

Discussion