Skip to main content
QUICK REVIEW

[Paper Review] Latent space conditioning for improved classification and anomaly detection

Erik Norlander, Alexandros Sopasakis|arXiv (Cornell University)|Nov 24, 2019
Anomaly Detection Techniques and ApplicationsComputer Science26 references13 citations
TL;DR

This paper proposes the Conditional Latent Space Variational Autoencoder (CL-VAE), a method that improves clustering and anomaly detection by conditioning the VAE's latent space on known class labels, using a Gaussian Mixture Model prior per class. It outperforms standard VAEs and established anomaly detection methods on MNIST and real-world trading data, especially in unsupervised settings with imbalanced or noisy data.

ABSTRACT

We propose a new type of variational autoencoder to perform improved pre-processing for clustering and anomaly detection on data with a given label. Anomalies however are not known or labeled. We call our method conditional latent space variational autonencoder since it separates the latent space by conditioning on information within the data. The method fits one prior distribution to each class in the dataset, effectively expanding the prior distribution to include a Gaussian mixture model. Our approach is compared against the capabilities of a typical variational autoencoder by measuring their V-score during cluster formation with respect to the k-means and EM algorithms. For anomaly detection, we use a new metric composed of the mass-volume and excess-mass curves which can work in an unsupervised setting. We compare the results between established methods such as as isolation forest, local outlier factor and one-class support vector machine.

Motivation & Objective

  • To address the challenge of clustering and anomaly detection in real-world data with class imbalance, missing values, mislabeling, and overlapping classes.
  • To improve unsupervised performance by conditioning the VAE's latent space on known class labels, enabling better separation of data distributions.
  • To develop a method that retains relational feature information while reducing dimensionality for downstream analysis.
  • To evaluate the method using novel metrics, including EM-MV for anomaly detection and V-score for clustering, in both supervised and unsupervised settings.
  • To demonstrate effectiveness on diverse, realistic datasets, including MNIST and real trading data with inherent data quality issues.

Proposed method

  • The CL-VAE conditions the latent space on class labels by fitting a separate prior distribution (Gaussian) per class, forming a Gaussian Mixture Model (GMM) prior.
  • It modifies the standard VAE loss function to include class-specific KL divergence regularization, ensuring each class's latent representation adheres to its assigned prior.
  • The encoder maps input data to a latent vector, while the decoder reconstructs the input from the latent code, minimizing reconstruction error.
  • The method uses a class-conditional prior distribution, allowing the model to learn distinct latent manifolds per class without assuming a single shared prior.
  • It applies k-means and EM clustering on the conditioned latent space to evaluate clustering performance via the V-score metric.
  • For anomaly detection, it introduces an EM-MV metric combining mass-volume and excess-mass curves to assess performance in unsupervised settings.

Experimental results

Research questions

  • RQ1Can conditioning the latent space of a VAE on known class labels improve clustering performance compared to standard VAEs?
  • RQ2Does the CL-VAE outperform established anomaly detection methods like Isolation Forest, LOF, and One-Class SVM in unsupervised settings?
  • RQ3How effective is the proposed EM-MV metric in evaluating anomaly detection performance without labeled anomalies?
  • RQ4To what extent does the CL-VAE handle data issues such as class imbalance, mislabeling, and missing features in real-world applications?
  • RQ5Can the CL-VAE maintain or improve performance when the latent space is reduced to two dimensions for visualization and analysis?

Key findings

  • The CL-VAE significantly improves clustering performance, as measured by the V-score, compared to standard VAEs when using k-means and EM algorithms on both MNIST and real trading data.
  • On the MNIST dataset, the CL-VAE achieves higher V-scores than baseline VAEs, indicating better cluster separation and purity.
  • The EM-MV metric demonstrates strong performance in detecting anomalies in unsupervised settings, outperforming Isolation Forest, LOF, and One-Class SVM on the real trading dataset.
  • The method effectively handles data with class imbalance and mislabeling, showing robustness in real-world applications.
  • Latent space conditioning enables better disentanglement of class-specific features, improving downstream clustering and anomaly detection.
  • The use of a class-specific GMM prior allows the model to capture complex, multi-modal data distributions more effectively than a single Gaussian prior.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.