I am trying to perform outlier detection using VAE. Before I was performing the same task using normal autoencoder and I used reconstruction error, I trained the network, then I passed new samples as input and marked those with high reconstruction error as outliers.
I know that similar things can be done with VAE, but I was wondering if I could somehow use information from LATENT SPACE? An encoder is learning to get means and STDs that are close to a normal distribution and then decoder to sample from those and recreate input.
But I was wondering if now after training I can pass a new sample through just ENCODER, obtain latent space variables, and based on them decide somehow if the sample is an outlier or not?
I thought about sampling from obtained distribution, checking how far from 0 is the point and if far then marking this sample as an outlier, but using sampling feels a bit random. Or maybe most outlying samples should return after encoding most "unnormal" mean and std?