Classifier-head Informed Feature Masking and Prototype-based Logit Smoothing for Out-of-Distribution Detection

Zhuohao Sun, Yiqiao Qiu, Zhijun Tan, Weishi Zheng, Ruixuan Wang
10/27/2023
cs.CV

No confident code implementation found for this paper.

Abstract

Out-of-distribution (OOD) detection is essential when deploying neural networks in the real world. One main challenge is that neural networks often make overconfident predictions on OOD data.

Show full abstract

In this study, we propose an effective post-hoc OOD detection method based on a new feature masking strategy and a novel logit smoothing strategy. Feature masking determines the important features at the penultimate layer for each in-distribution (ID) class based on the weights of the ID class in the classifier head and masks the rest features. Logit smoothing computes the cosine similarity between the feature vector of the test sample and the prototype of the predicted ID class at the penultimate layer and uses the similarity as an adaptive temperature factor on the logit to alleviate the network's overconfidence prediction for OOD data. With these strategies, we can reduce feature activation of OOD data and enlarge the gap in OOD score between ID and OOD data. Extensive experiments on multiple standard OOD detection benchmarks demonstrate the effectiveness of our method and its compatibility with existing methods, with new state-of-the-art performance achieved from our method. The source code will be released publicly.

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. Any repos shown below are weak matches — 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{sun2023classifierhead,
  title  = {Classifier-head Informed Feature Masking and Prototype-based Logit Smoothing for Out-of-Distribution Detection},
  author = {Zhuohao Sun and Yiqiao Qiu and Zhijun Tan and Weishi Zheng and Ruixuan Wang},
  year   = {2023},
  eprint = {2310.18104},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.18104v1}
}

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

Discussion