TL;DR
This paper introduces two novel variational methods, MML-VAE and DP-VAE, to improve semi-supervised anomaly detection (SSAD) by leveraging a small set of labeled anomalies alongside normal data. These methods effectively train Variational Autoencoders (VAEs) to "push away" anomalous data in the latent space, achieving state-of-the-art results across diverse datasets.
What Problem Does This Paper Address?
Anomaly detection (AD) aims to identify unusual samples within a dataset. A common scenario is unsupervised AD, where only normal data is available for training. However, semi-supervised AD (SSAD) offers a more practical setting by including a small, but insufficient, set of labeled anomalies. This limited anomaly data is crucial for guiding the model but too sparse to train a traditional supervised classifier. Existing SSAD methods often rely on specific architectures or heuristics. This paper addresses the challenge of effectively incorporating this small amount of labeled anomaly data into deep generative models like VAEs to improve anomaly detection performance without requiring domain-specific assumptions or restrictive model architectures.
Methods
The authors propose two variational methods for training VAEs for SSAD:
- Max-Min Likelihood VAE (MML-VAE): This method aims to maximize the likelihood of normal samples while simultaneously minimizing the likelihood of the labeled outlier samples. This is achieved by optimizing a lower bound that combines the standard Evidence Lower Bound (ELBO) for normal data with a "CUBO" (x upper bound) for outlier data. The core idea is to encourage the VAE encoder to learn a latent representation where normal data has high probability and outlier data has low probability.
- Dual Prior VAE (DP-VAE): This approach modifies the VAE's prior distribution. Instead of a single prior for all latent variables, DP-VAE assumes two distinct Gaussian priors: one for normal data and another for outlier data. By training the VAE with these dual priors, the encoder is encouraged to disentangle the latent representations of normal and anomalous samples.
Both methods share the same encoder for normal and outlier data, which is a key design choice to leverage the limited outlier data effectively. They also propose freezing the decoder during the outlier loss optimization to prevent negative impacts on the normal data reconstruction.
Datasets
The authors evaluate their methods on a comprehensive suite of datasets, including:
- Image Datasets: MNIST, Fashion-MNIST, CIFAR-10, and CatsVsDogs.
- Classic Anomaly Detection Benchmark Datasets: arrhythmia, cardio, satellite, satimage-2, shuttle, and thyroid.
- NLP Dataset: IMDB reviews (for sentiment analysis).
- Robotics Dataset: Path Planning (demonstrating application to conditional VAEs).
These datasets cover a wide range of domains and dimensionality, showcasing the generality of the proposed approach.
Key Insights and Ideas
- Leveraging Limited Anomalies: Even a tiny fraction (1%) of labeled anomalies can significantly boost anomaly detection performance compared to purely unsupervised methods.
- Latent Space Separation: The core intuition behind both MML-VAE and DP-VAE is to train the VAE encoder to "push away" anomalous data from the latent space occupied by normal data.
- Principled Probabilistic Formulation: The proposed methods are derived from sound probabilistic formulations, offering a theoretical foundation for their effectiveness.
- Architectural Flexibility: The methods are compatible with any VAE architecture, making them broadly applicable.
- Ensembling Benefits: Combining multiple VAEs through ensembling further improves performance and robustness, a benefit that is more pronounced in their VAE-based approach compared to some other methods.
Key Results
- State-of-the-Art Performance: Both MML-VAE and DP-VAE consistently outperform existing state-of-the-art SSAD methods, particularly Deep SAD, across various image and classic anomaly detection datasets.
- Significant Improvement with Few Anomalies: For instance, on image datasets, even with only 1% labeled outliers, their methods achieve substantial improvements over unsupervised VAEs and competitive baselines.
- Generality Across Domains: The methods demonstrate strong performance on diverse data types, from natural images to medical data and text, highlighting their flexibility.
- Application to Conditional VAEs: The DP-VAE approach was successfully applied to enhance a conditional VAE for robot motion planning, generating more informative samples for obstacle avoidance.
Limitations and Future Work
- Domain-Specific Methods: While their probabilistic approach is general, the authors acknowledge that for specific domains like images, discriminative methods exploiting domain-specific features (e.g., geometric transformations) can achieve very high performance.
- Future Research Directions: The authors suggest exploring similar self-supervised methods for generative approaches and investigating how to incorporate domain-specific knowledge into their probabilistic framework. They also note that extending their approach to use unlabelled data, image augmentations, or pre-trained features is an interesting direction for future work.
Summary updated