Deep Variational Semi-Supervised Novelty Detection

Tal Daniel, Thanard Kurutach, Aviv Tamar

Introduction

Anomaly Detection (AD) is the critical task of identifying rare, abnormal samples within a dataset. While traditionally approached as an unsupervised problem, real-world scenarios often provide a small number of labeled outliers. This scenario, known as Semi-Supervised Anomaly Detection (SSAD), is challenging because the outlier set is typically too small to train standard classifiers. This paper introduces two novel variational methods, MML-VAE and DP-VAE, which leverage these few examples to significantly improve detection performance and generalization to unseen anomaly types.

Proposed Methods

The authors extend the standard Variational Autoencoder (VAE) framework with two distinct strategies for incorporating labeled outliers:

  1. Max-Min Likelihood VAE (MML-VAE): This method modifies the training objective to maximize the likelihood of normal samples while minimizing the likelihood of labeled outliers. It utilizes the standard Evidence Lower Bound (ELBO) for normal data and a newer $\chi$ upper bound (CUBO) for outliers, forcing the encoder to place anomalies in regions the model considers highly unlikely.
  2. Dual Prior VAE (DP-VAE): This approach assigns different prior distributions in the latent space for normal data (e.g., centered at zero) and outlier data (e.g., shifted). The encoder is then trained to separate the two groups based on these priors.

Key technical innovations include a shared encoder to prevent overfitting on the small outlier set, a frozen decoder during outlier updates to ensure the model doesn't learn to reconstruct anomalies, and ensembling multiple models to stabilize results.

Experimental Evaluation

The methods were evaluated across a massive variety of benchmarks, including image datasets (MNIST, CIFAR-10), classic medical and astronomical AD benchmarks, robotics path planning, and NLP sentiment analysis.

Performance comparison (AUROC) across different outlier ratios ($\gamma_l$) on image datasets.

As shown in the results table, MML-VAE and DP-VAE consistently outperform baselines like Deep SAD. Notably, providing just 1% labeled anomalies ($\gamma_l = .01$) leads to a substantial jump in AUROC compared to purely unsupervised methods ($\gamma_l = .00$).

The "Push" Effect and Generalization

A core insight of this work is the "push" effect: by exposing the VAE to even a few outliers, the encoder learns to actively separate them from the normal data cluster in the latent space. This separation makes the boundary for normalcy much sharper.

Latent space visualization illustrating the clear separation of outliers from the normal data distribution.

Crucially, the model demonstrates strong generalization. In MNIST experiments, training with only one digit as an outlier improved the detection of all other non-normal digits, proving the model learns a general concept of "abnormality" rather than just memorizing specific samples.

Conclusion

MML-VAE and DP-VAE provide a principled, probabilistic framework for SSAD that avoids the architectural constraints of previous methods. By effectively utilizing minimal labeled data, these models achieve state-of-the-art performance across diverse domains, from medical diagnosis to robotic path planning.

Summary updated

BibTeX
@inproceedings{daniel2021deep,
  author = {Tal Daniel and Thanard Kurutach and Aviv Tamar},
  title = {{Deep Variational Semi-Supervised Novelty Detection}},
  booktitle = {DGMs Applications @ NeurIPS},
  year = {2021},
  url = {https://openreview.net/forum?id=pyEsZ1jQXw},
}
Figure