Out-of-Distribution Example Detection in Deep Neural Networks using Distance to Modelled Embedding

Rickard Sjögren, Johan Trygg
8/24/2021
cs.LG

Official code: sartorius-research/dime.pytorch (2 stars, Python, MIT, last commit 2021-08-25).

Abstract

Adoption of deep learning in safety-critical systems raise the need for understanding what deep neural networks do not understand after models have been deployed. The behaviour of deep neural networks is undefined for so called out-of-distribution examples.

Show full abstract

That is, examples from another distribution than the training set. Several methodologies to detect out-of-distribution examples during prediction-time have been proposed, but these methodologies constrain either neural network architecture, how the neural network is trained, suffer from performance overhead, or assume that the nature of out-of-distribution examples are known a priori. We present Distance to Modelled Embedding (DIME) that we use to detect out-of-distribution examples during prediction time. By approximating the training set embedding into feature space as a linear hyperplane, we derive a simple, unsupervised, highly performant and computationally efficient method. DIME allows us to add prediction-time detection of out-of-distribution examples to neural network models without altering architecture or training while imposing minimal constraints on when it is applicable. In our experiments, we demonstrate that by using DIME as an add-on after training, we efficiently detect out-of-distribution examples during prediction and match state-of-the-art methods while being more versatile and introducing negligible computational overhead.

View on arXivView PDF

Code Implementations(1)

MIT

PyTorch-implementation of the DIME method to detect out-of-distribution observations in deep learning.

20PythonAug 24, 20215 years agoMIT

Similar Papers

Cite this paper

@article{sjgren2021outofdistribution,
  title  = {Out-of-Distribution Example Detection in Deep Neural Networks using Distance to Modelled Embedding},
  author = {Rickard Sjögren and Johan Trygg},
  year   = {2021},
  eprint = {2108.10673},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2108.10673}
}

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

Discussion