Entropic Out-of-Distribution Detection: Seamless Detection of Unknown Examples

David Macêdo, Tsang Ing Ren, Cleber Zanchettin, Adriano L. I. Oliveira, Teresa Ludermir
6/7/2020
32 citations
cs.LGcs.CVstat.ML

Official code: dlmacedo/entropic-out-of-distribution-detection (79 stars, Python, Apache-2.0, PyTorch, last commit 2022-09-22).

Abstract

In this paper, we argue that the unsatisfactory out-of-distribution (OOD) detection performance of neural networks is mainly due to the SoftMax loss anisotropy and propensity to produce low entropy probability distributions in disagreement with the principle of maximum entropy. Current out-of-distribution (OOD) detection approaches usually do not directly fix the SoftMax loss drawbacks, but rather build techniques to circumvent it.

Show full abstract

Unfortunately, those methods usually produce undesired side effects (e.g., classification accuracy drop, additional hyperparameters, slower inferences, and collecting extra data). In the opposite direction, we propose replacing SoftMax loss with a novel loss function that does not suffer from the mentioned weaknesses. The proposed IsoMax loss is isotropic (exclusively distance-based) and provides high entropy posterior probability distributions. Replacing the SoftMax loss by IsoMax loss requires no model or training changes. Additionally, the models trained with IsoMax loss produce as fast and energy-efficient inferences as those trained using SoftMax loss. Moreover, no classification accuracy drop is observed. The proposed method does not rely on outlier/background data, hyperparameter tuning, temperature calibration, feature extraction, metric learning, adversarial training, ensemble procedures, or generative models. Our experiments showed that IsoMax loss works as a seamless SoftMax loss drop-in replacement that significantly improves neural networks' OOD detection performance. Hence, it may be used as a baseline OOD detection approach to be combined with current or future OOD detection techniques to achieve even higher results.

View on arXivView PDF

Code Implementations(1)

PyTorchApache-2.0

A project to add scalable state-of-the-art out-of-distribution detection (open set recognition) support by changing two lines of code! Perform efficient inferences (i.e., do not increase inference time) and detection without classification accuracy drop, hyperparameter tuning, or collecting additional data.

7910Python, ShellAug 16, 20194 years agoApache-2.0
ai-safetyanomaly-detectiondeep-learningmachine-learningnovelty-detection+11 more

Similar Papers

Cite this paper

@article{macdo2020entropic,
  title  = {Entropic Out-of-Distribution Detection: Seamless Detection of Unknown Examples},
  author = {David Macêdo and Tsang Ing Ren and Cleber Zanchettin and Adriano L. I. Oliveira and Teresa Ludermir},
  year   = {2020},
  eprint = {2006.04005},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2006.04005}
}

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

Discussion