Answers.Body: <p>You observation is correct although the terminology needs a little explaining.</p>
  <p>The term 'out-of-distribution' (OOD) data refers to data that was collected at a different time, and possibly under different conditions or in a different environment, then the data collected to create the model.  They may say that this data is from a 'different distribution'.</p>
  <p>Data that is in-distribution can be called novelty data.  Novelty detection is when you have new data (i.e. OOD) and you want to know whether or not it is in-distribution.  You want to know if it looks like the data you trained on.
  Anomaly detection is when you test your data to see if it is different than what you trained the model.  Out-of-distribution detection is essentially running your model on OOD data.  So one takes OOD data and does novelty detection or anomaly detection (aka outlier detection).</p>
  <p>Below is a figure from <a href="https://awesomeopensource.com/project/hoya012/awesome-anomaly-detection?categoryPage=18" rel="nofollow noreferrer">What is anomaly detection?</a></p>
  <p><a href="https://i.sstatic.net/Bzj4P.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Bzj4P.png" alt="enter image description here" /></a></p>
  <p>In time series modeling, the term 'out-of-distribution' data is analogous to 'out-of-sample' data and 'in-distribution' data is analogous with 'in-sample' data.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-25T14:57:30.743Z
Answers.Text: Thanks for the answer. What do you mean by "*Out-of-distribution detection is essentially running your model on OOD data.*" and "*So one takes OOD data and does novelty detection or anomaly detection (aka outlier detection).*"?
Answers.UserDisplayName: mhdadk
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-25T16:49:42.240Z
Answers.Text: I updated the answer with a figure which might help although it could be better written.  The data on the left is what was used to train the model.  The data on the right, for single and multi-class, are OOD.
Answers.UserDisplayName: Brian O'Donnell
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-25T13:38:10.043Z
Answers.LastActivityDate: 2021-01-25T16:47:40.423Z
Answers.LastEditDate: 2021-01-25T16:47:40.423Z
Answers.UserDisplayName: Brian O'Donnell
Body: <p>I'm currently reading the paper <a href="https://arxiv.org/abs/1906.02845" rel="nofollow noreferrer">Likelihood Ratios for Out-of-Distribution Detection</a>, and it seems that their problem is very similar to the problem of <a href="https://en.wikipedia.org/wiki/Anomaly_detection" rel="nofollow noreferrer">anomaly detection</a>. More precisely, given a neural network trained on a dataset consisting of classes <span class="math-container">$A,B,$</span> and <span class="math-container">$C$</span>, then they can detect if an input to the neural network is anomalous if it is different than these three classes. What is the difference between what they are doing and regular anomaly detection?</p>
  
Tags: <neural-networks><comparison><papers><anomaly-detection>
Title: What is the difference between out of distribution detection and anomaly detection?
UserDisplayName: mhdadk
ThreadText: # What is the difference between out of distribution detection and anomaly detection?
  
  (Asked by: username_0 on 2021-01-25)
  
  I'm currently reading the paper [Likelihood Ratios for Out-of-Distribution Detection](https://arxiv.org/abs/1906.02845), and it seems that their problem is very similar to the problem of [anomaly detection](https://en.wikipedia.org/wiki/Anomaly_detection). More precisely, given a neural network trained on a dataset consisting of classes $A,B,$ and $C$, then they can detect if an input to the neural network is anomalous if it is different than these three classes. What is the difference between what they are doing and regular anomaly detection?
  
  **Tags:** neural-networks, comparison, papers, anomaly-detection
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-01-25. Score: 5 | Accepted answer
  
  You observation is correct although the terminology needs a little explaining.
  
  The term 'out-of-distribution' (OOD) data refers to data that was collected at a different time, and possibly under different conditions or in a different environment, then the data collected to create the model. They may say that this data is from a 'different distribution'.
  
  Data that is in-distribution can be called novelty data. Novelty detection is when you have new data (i.e. OOD) and you want to know whether or not it is in-distribution. You want to know if it looks like the data you trained on.
  Anomaly detection is when you test your data to see if it is different than what you trained the model. Out-of-distribution detection is essentially running your model on OOD data. So one takes OOD data and does novelty detection or anomaly detection (aka outlier detection).
  
  Below is a figure from [What is anomaly detection?](https://awesomeopensource.com/project/hoya012/awesome-anomaly-detection?categoryPage=18)
  
  [![enter image description here](https://i.sstatic.net/Bzj4P.png)](https://i.sstatic.net/Bzj4P.png)
  
  In time series modeling, the term 'out-of-distribution' data is analogous to 'out-of-sample' data and 'in-distribution' data is analogous with 'in-sample' data.
  
  > **Comments:**
  > **username_0**: Thanks for the answer. What do you mean by "*Out-of-distribution detection is essentially running your model on OOD data.*" and "*So one takes OOD data and does novelty detection or anomaly detection (aka outlier detection).*"?  
  > **username_1**: I updated the answer with a figure which might help although it could be better written.  The data on the left is what was used to train the model.  The data on the right, for single and multi-class, are OOD.  
  
  ---
  
  