Abstract
Traditional anomaly detection methods often face a trade-off between computational efficiency and the ability to detect complex, correlation-based anomalies. This paper presents SPAD+, an enhanced version of the Simple Probabilistic Anomaly Detector (SPAD). By augmenting the original feature set with principal components, SPAD+ overcomes the "independence assumption" of standard histogram-based methods. Experimental results across 15 benchmark datasets demonstrate that SPAD+ achieves superior accuracy (average rank 1.67) and maintains high scalability, making it suitable for large-scale data applications.
Introduction
In the era of big data, the volume of records ($N$) and dimensions ($M$) makes distance-based anomaly detection algorithms like Local Outlier Factor (LOF) computationally expensive due to their $O(N^2)$ or $O(N \log N)$ complexity. Histogram-based methods, such as the Simple Probabilistic Anomaly Detector (SPAD), offer a faster alternative by assuming feature independence and calculating scores in $O(NM)$ time.
However, this independence assumption leads to a failure in detecting Type II anomalies—data points that appear normal in individual dimensions but are anomalous when feature correlations are considered. For example, a person's height and weight might both be within normal ranges individually, but their combination could be highly improbable.
Methodology
SPAD+ addresses the limitations of independence-based detection through a feature expansion strategy.
Feature Augmentation via PCA
The core innovation of SPAD+ is the inclusion of Principal Component Analysis (PCA) features alongside original attributes.
- Robust Histograms: The algorithm uses equal-width histograms to estimate probability mass. To mitigate the impact of outliers on binning, ranges are defined by $[\mu - 3\sigma, \mu + 3\sigma]$ rather than absolute extremes.
- PCA Transformation: PCA is applied to the training set to identify uncorrelated axes (Principal Components).
- Feature Doubling: Instead of using PCA for dimensionality reduction, SPAD+ doubles the feature space. For an input with $M$ features, the model operates on $2M$ features (original + principal components).
- Scoring: The anomaly score is the sum of log-probabilities across all $2M$ dimensions. A low probability mass in any dimension—original or principal component—contributes to a higher anomaly score.
Computational Efficiency
Despite the added PCA step, SPAD+ remains highly efficient. The PCA eigen-decomposition is a one-time cost during training ($O(M^3)$). During the testing phase, the complexity is $O(nM)$, where $n$ is the number of test samples. This linear scaling ensures that SPAD+ can handle massive datasets where distance-based methods fail.
Experimental Results
The authors evaluated SPAD+ against 15 diverse datasets spanning medical, cybersecurity, and image domains, with sizes ranging from $N=112$ to $N=141,650$.
- Accuracy: SPAD+ achieved the best average rank (1.67) compared to LOF (2.80), Isolation Forest (3.40), and the original SPAD (3.80). It improved the Area Under the Curve (AUC) in 13 out of 15 datasets.
- Scalability: On the Covertype dataset ($N \approx 141k$), SPAD+ was approximately 10 times faster than LOF (44s vs 438s) while delivering competitive performance.
- Low-Variance Components: A key finding is that low-variance principal components are crucial for detection. These components represent the "constraints" of the data; anomalies often manifest as violations of these constraints.
Conclusion
SPAD+ successfully bridges the gap between the speed of histogram-based methods and the correlation-awareness of PCA. By doubling the feature space, it effectively identifies both Type I (univariate) and Type II (multivariate) anomalies. While currently limited to linear correlations, future work exploring efficient non-linear transformations could further enhance its detection capabilities for complex data manifolds.
Summary updated