Answers.Body: <p>It is computed just like in training. You take an MSE or something along these lines between the input and the output. You set a threshold for it. If new data's reconstruction error is higher than your threshold, then it is anomalous otherwise it isn't.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-17T19:02:12.300Z
Answers.LastActivityDate: 2021-02-17T19:02:12.300Z
Answers.UserDisplayName: Abhishek Verma
Body: <p>Autoencoders are used for unsupervised anomaly detection by first learning the features of the data set with mainly &quot;normal&quot; data points. Then new data can be considered anomalous if the new data has a large reconstruction error, i.e. it was hard to fit the features as in the normal data.</p>
  <p>Even if the training is supervised by learning to reconstruct the same data, how is the reconstruction error computed for the new data?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-06-06T07:11:15.553Z
Comments.Text: Hi, thanks for the detailed answer, I appreciated it. It guided me towards the right direction. However, it was not directly answering my question. When you say, the AE expects specific features to be of a specific magnitude compared to other features, I feel like that is misunderstanding a bit. The AE itself does not reason about the magnitude. I think the point I was missing is that the recon. error is actually just a value for how different the output is to the (ideally identical) input. If the magnitude of features is out of order as you describe, the recon. error most probably increases.
Comments.UserDisplayName: Brian
Tags: <unsupervised-learning><autoencoders><anomaly-detection>
Title: How can auto-encoders compute the reconstruction error for the new data?
UserDisplayName: Brian
ThreadText: # How can auto-encoders compute the reconstruction error for the new data?
  
  (Asked by: username_0 on 2019-05-29)
  
  Autoencoders are used for unsupervised anomaly detection by first learning the features of the data set with mainly "normal" data points. Then new data can be considered anomalous if the new data has a large reconstruction error, i.e. it was hard to fit the features as in the normal data.
  
  Even if the training is supervised by learning to reconstruct the same data, how is the reconstruction error computed for the new data?
  
  **Tags:** unsupervised-learning, autoencoders, anomaly-detection
  > **Comments:**
  > **username_0**: Hi, thanks for the detailed answer, I appreciated it. It guided me towards the right direction. However, it was not directly answering my question. When you say, the AE expects specific features to be of a specific magnitude compared to other features, I feel like that is misunderstanding a bit. The AE itself does not reason about the magnitude. I think the point I was missing is that the recon. error is actually just a value for how different the output is to the (ideally identical) input. If the magnitude of features is out of order as you describe, the recon. error most probably increases.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-02-17. Score: 1
  
  It is computed just like in training. You take an MSE or something along these lines between the input and the output. You set a threshold for it. If new data's reconstruction error is higher than your threshold, then it is anomalous otherwise it isn't.
  
  
  ---
  
  