TL;DR
Real-world semi-supervised anomaly detection is often bottlenecked by "contaminated" unlabeled data that contains hidden anomalies. This paper introduces a deep positive-unlabeled (PU) learning framework that mathematically corrects for this contamination, allowing models to learn robust normal representations without requiring clean normal labels. By integrating PU learning with deep architectures like Autoencoders and DeepSVDD, the proposed method successfully flags both known and entirely novel types of anomalies.
What Problem Does This Paper Address?
Anomaly detection is vital for everything from cyber-security to medical diagnosis. While unsupervised methods are easy to deploy because they don't require expensive labels, their performance is often limited. Semi-supervised anomaly detection attempts to fix this by incorporating a small set of labeled anomalies alongside a large pool of unlabeled data.
However, existing semi-supervised methods suffer from a major flaw: they assume the unlabeled data is completely clean (i.e., purely normal). In practice, unlabeled data collected from the wild is frequently contaminated with hidden anomalies. When standard models try to minimize anomaly scores across all unlabeled data, they inadvertently teach themselves to treat these hidden anomalies as normal. The authors tackle this exact challenge: how do we build an accurate deep anomaly detector when our only large data pool is messy and contaminated?
Methods
The authors solve this by combining Positive-Unlabeled (PU) learning with deep anomaly detection models. PU learning mathematically treats the unlabeled data distribution ($p_U$) as a weighted mixture of the true normal distribution ($p_N$) and the anomaly distribution ($p_A$):
$$p_U(\mathbf{x}) = \alpha p_A(\mathbf{x}) + (1 - \alpha)p_N(\mathbf{x})$$
where $\alpha$ is the anomaly contamination rate. By rearranging this equation, the authors derive an objective function that approximates the anomaly scores for pure normal data using only the contaminated unlabeled data and the labeled anomalies.
They implement this framework across two popular deep architectures:
- PUAE (Positive-Unlabeled Autoencoder): Integrates the PU loss formulation with the reconstruction error of an Autoencoder.
- PUSVDD (Positive-Unlabeled Support Vector Data Description): Adapts the DeepSVDD objective, which attempts to pull normal data representations toward a central point while pushing anomalies away.
Crucially, because deep neural networks are highly flexible, standard empirical PU loss can diverge toward negative infinity during training. To prevent this, the authors incorporate an absolute value constraint on the normal data loss component, ensuring stable optimization via standard stochastic gradient descent (SGD).
Datasets
The framework was evaluated across eight distinct image datasets:
- Standard Vision Benchmarks: MNIST, FashionMNIST, SVHN, and CIFAR10.
- Medical Image Benchmarks (MedMNIST): PathMNIST (colorectal cancer histology), OCTMNIST (retinal optical coherence tomography), and TissueMNIST (kidney cortex cells).
- Complex Vision Benchmark: CIFAR100.
To simulate real-world conditions, the training sets were intentionally contaminated (e.g., 4,500 unlabeled normal samples mixed with 250 unlabeled anomalies, alongside 250 labeled anomalies). Furthermore, one entire class was completely withheld during training to act as an "unseen anomaly" during testing to evaluate the models' generalization capabilities.
Key Insights and Ideas
- Overcoming the Binary Classification Blindspot: Standard PU learning acts as a binary classifier, drawing a rigid boundary between seen anomalies and the rest of the data. As a result, it completely fails to detect unseen types of anomalies. By embedding PU learning inside an anomaly detection framework (like an Autoencoder), the model retains the ability to flag anything that deviates from normal patterns, catching both seen and unseen anomalies.
- Mathematical Correction vs. Heuristic Filtering: Rather than trying to heuristically filter out or guess which unlabeled samples are anomalies (which can lead to compounding errors), this method uses an unbiased risk estimator to mathematically cancel out the statistical bias introduced by contamination.
Key Results
The proposed methods, particularly PUSVDD, consistently outperformed both unsupervised baselines and state-of-the-art semi-supervised methods designed for contaminated data.
- Superior Performance: On the MNIST dataset, PUSVDD achieved a top AUROC score of 0.989, significantly outperforming standard unsupervised DeepSVDD (0.937) and the recent state-of-the-art semi-supervised competitor, SOEL (0.965).
- Robustness to Mis-estimation: The framework proved highly robust to hyperparameter sensitivity. Even when the user's guess for the contamination rate ($\alpha$) deviated from the true value, PUSVDD maintained stable performance, whereas competing methods degraded rapidly.
Limitations and Future Work
- Dependence on the Contamination Rate ($\alpha$): Although the model is more robust to variations in $\alpha$ than its competitors, it still requires an initial estimate of the contamination proportion. If $\alpha$ is drastically mis-estimated, performance can still suffer.
- Domain Constraints: The experimental validation in this paper is strictly confined to image data. The authors explicitly note that extending this deep PU framework to handle complex time-series data is a vital next step for future research.
Summary updated