Top 3 Metrics for Quantifying Latent Space Outliers

The Kullback-Leibler (KL) Divergence is fundamental in VAEs, measuring how much an input's encoded posterior distribution deviates from the prior, with higher values often indicating anomalies. Mahalanobis Distance in the latent space helps identify outliers by measuring how far a data point's latent representation is from the centroid of normal data, accounting for correlations. Often, these are combined with Reconstruction Error or Reconstruction Probability to form a more robust anomaly score.

The top 3

  1. Mahalanobis Distance: Multivariate Outlier Detection's Edge: Mahalanobis distance measures how far a latent vector is from the mean of a distribution, uniquely accounting for correlations and varying scales among the latent dimensions, making it robust for multivariate anomaly detection.
  2. VAE Latent Likelihood: Anomaly Scoring via Probability: For Variational Autoencoders (VAEs), anomalies often exhibit significantly lower log-likelihoods under the learned Gaussian distribution of the latent space, serving as a direct probabilistic anomaly score derived from the model's generative capabilities.
  3. LOF for Latent Space: Density-Based Anomaly Ranking: Local Outlier Factor (LOF) assigns an anomaly score by comparing a latent vector's local density to that of its neighbors, effectively identifying points in regions significantly sparser than their surroundings.

Open the full topic