Let's say I trained an encoder-decoder network on a cat dataset using reconstruction error as loss function. The network is fully trained and the decoder is able to reconstruct good cat images.

Now what if I use the same network and input a dog image. Will the network be able to reconstruct dog image or not?


It probably won't. The whole point of the training was to encode cat images and thus the network has tried to learn what information is the most necessary to keep to ensure a low reconstruction error (i.e. what separates one cat from another) and what information can it throw away (i.e. what characteristics appear in all cat images and can be discarded).

That being said, a dog image would produce a fairly decent reconstruction because most features are shared between both animals. If you try, however, to reconstruct something completely different (e.g. a car) then it would probably fail.

  • $\begingroup$ I need to train an auto-encoder for ecg time series data for anomaly detection. I'm assuming when trained with normal data taking reconstruction error as loss, during testing if I input any time series different than original one, I would get high error. Will it work ? $\endgroup$
    – ashukid
    Aug 26 '19 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.