Abstract
Traditional anomaly detection (AD) methods often rely on the assumption that unlabeled training data consists exclusively of normal instances. However, real-world datasets are frequently "polluted" with latent anomalies, leading to performance degradation in standard one-class models. This paper presents rAD (risk-based Anomaly Detection), a framework that leverages semi-supervised learning to handle polluted unlabeled data. By utilizing novel risk estimators for both shallow and deep learning architectures, rAD provides a mathematically grounded approach to AD that remains robust under varying levels of pollution.
Introduction
Anomaly detection is critical in domains ranging from fraud detection to industrial monitoring. A common limitation of existing methods, such as One-Class SVM (OC-SVM), is the "purity assumption"—the belief that unlabeled data used for training is entirely free of anomalies. When this assumption is violated, models often overfit to the anomalies present in the training set, treating them as normal behavior.
While Positive-Unlabeled (PU) learning addresses some of these issues, it typically lacks labeled anomalous data. This work explores the semi-supervised setting, where a small set of labeled normal (Positive) and anomalous (Negative) points are available alongside a large, polluted Unlabeled dataset.
Methodology: The rAD Framework
The proposed rAD method treats anomaly detection as a binary classification problem using three distinct data sources: Positive ($P$), Negative ($N$), and Unlabeled ($U$).
Shallow rAD and Unbiased Risk Estimators
For shallow models, the authors derive an unbiased risk estimator. A significant challenge in this approach is that empirical risk can become negative, leading to overfitting. To mitigate this, the framework incorporates a regularization strategy, supported by theoretical proofs (Theorem 1), to ensure the risk remains non-negative during optimization.
Deep rAD
For high-dimensional data, a deep neural network implementation is provided. Deep rAD utilizes a non-negative (biased) risk estimator, a technique adapted from PU learning, to maintain stability during the training of complex models.
Loss Function Selection
The choice of loss function $\ell(z)$ is pivotal for the performance of the risk estimators. The researchers evaluated several standard and robust loss functions to determine their impact on model stability and accuracy.
Experimental results indicated that the Modified Huber loss is particularly effective for shallow rAD, offering superior robustness compared to standard squared or hinge losses. As shown in the table above, the Modified Huber loss is defined piecewise, providing a quadratic penalty for small errors and a linear penalty for larger ones, which aids in handling outliers.
Theoretical Analysis
Unlike many heuristic-based AD methods, rAD is supported by formal statistical guarantees. The authors establish estimation error bounds and excess risk bounds, providing a mathematical assurance that the learned model converges toward the optimal classifier as the sample size increases.
Experimental Results
The rAD framework was evaluated against 26 datasets from the Adbench suite and several image benchmarks (MNIST, Fashion-MNIST, CIFAR-10).
- Performance in Polluted Environments: rAD consistently outperformed baselines like OC-SVM, ECOD, and COPOD, especially in scenarios with high anomaly ratios in the unlabeled data.
- Deep Learning Comparisons: In image classification tasks, Deep rAD demonstrated significant gains over Deep SAD. While Deep SAD's performance declined as pollution increased, Deep rAD remained remarkably stable.
- Robustness to Priors: Although the model requires class prior estimates ($\pi_p$ and $\pi_n$), sensitivity analysis showed that rAD is robust to minor inaccuracies in these values.
Conclusion
The rAD framework addresses a fundamental weakness in traditional anomaly detection by mathematically accounting for anomalies within unlabeled training data. By combining robust loss functions with stable risk estimators, rAD provides a reliable solution for real-world AD tasks where data purity cannot be guaranteed. Future work will focus on automated estimation of class priors and improving the computational efficiency of the deep learning risk estimators.
Summary updated