TL;DR
This paper introduces GALDetector, a novel anomaly detection method that leverages only normal samples to identify outliers. By combining global patterns learned from clustering normal data with local sparsity information, GALDetector effectively detects anomalies even when they are rare and difficult to obtain, outperforming existing methods on various real-world datasets.
What Problem Does This Paper Address?
Anomaly detection is crucial for identifying unusual patterns in data, with applications ranging from cybersecurity to fraud detection. However, a significant challenge arises in real-world scenarios where only normal data samples are readily available, while anomalous samples are scarce, diverse, and constantly evolving. Traditional anomaly detection methods often struggle with this imbalance, requiring either abundant labeled data (supervised) or relying solely on unlabeled data without effectively utilizing the available normal samples (unsupervised). This paper addresses the gap of effectively detecting anomalies when only a collection of normal samples is at hand, a common and practical situation.
Methods
The proposed GALDetector method operates in three stages:
- Global and Local Score Calculation:
- Local Sparsity Score (LSS): This stage employs a density-based integration algorithm, inspired by decision trees, to partition the high-dimensional data space into dense and sparse subcubes. The sparsity of each subcube is calculated, and the LSS for a sample is the average sparsity across multiple trees. This captures local data characteristics.
- Global Normal Score (GNS): K-means clustering is used to identify distinct patterns within the observed normal samples. The GNS for a sample is then calculated based on its distance to the nearest cluster center, representing how well it conforms to the learned normal patterns.
- GALScore: The global and local scores are combined into a single GALScore using a weighted sum:
GALScore(x) = LSS(x) - μGNS(x). The negative sign for GNS is used because a higher GNS indicates normality. The hyperparameterμbalances the importance of global and local information. - Potential Anomalies Selection and Weights Setting:
- A threshold is applied to the GALScores to identify potential anomalous samples.
- Weights are assigned to both known normal samples and the selected potential anomalies. Potential anomalies receive weights based on their GALScore (higher score, higher weight), while normal samples receive a uniform weight. This helps address the class imbalance issue.
- Weighted Detector Construction:
- A weighted binary detector (specifically XGBoost) is trained using the weighted samples from the previous stage.
- This trained detector is then used to identify anomalies in the remaining unlabeled samples.
Datasets
The paper evaluates GALDetector on three categories of real-world datasets:
- Classification Datasets (UCI/OpenML): Thyroid, Seismic, and Mammography. These are binary classification tasks with approximately 5% minority class samples.
- Multi-Categorical Datasets: Satimage-2, Vowels, and Musk. These datasets have less than 1-4% minority class samples.
- Network Intrusion Datasets (KDD Cup 1999): smtp and http. These datasets have very low anomaly percentages (below 0.5%).
Key Insights and Ideas
- Leveraging Only Normal Data: The core innovation is demonstrating that effective anomaly detection can be achieved without any prior knowledge of anomalies, relying solely on a collection of normal samples. This is a significant departure from many existing methods.
- Synergy of Global and Local Information: The paper highlights the power of combining global patterns (learned from clustering normal data) with local density information. This dual perspective allows GALDetector to capture a more comprehensive understanding of normality and abnormality.
- Addressing Class Imbalance: The weighting scheme for potential anomalies and normal samples is a crucial component for handling the inherent imbalance in anomaly detection tasks, particularly when anomalies are rare.
- Robustness Across Domains: The method's performance across diverse datasets (classification, multi-categorical, network intrusion) suggests its generalizability.
Key Results
GALDetector demonstrates strong performance across the evaluated datasets:
- AUC Value: GALDetector is the top or joint top-performing algorithm on 4 out of 8 datasets in terms of AUC. It shows significant gains over unsupervised methods like PCA (7.03%), iForest (2.59%), PIDForest (1.13%), and LOF (25.51%) in overall AUC.
- F₁-Measure: The method is also top or jointly top-performing on 4 out of 8 datasets for F₁-measure. It achieves substantial improvements over unsupervised methods in overall F₁-measure: 19.08% (PCA), 15.35% (iForest), 14.99% (PIDForest), and 42.91% (LOF).
- Comparison with Other Methods: GALDetector outperforms supervised methods like KNN and S-SVM and achieves comparable or better results than semi-supervised methods like PUL, CPI, and ADOA, often with more stable performance across datasets.
Limitations and Future Work
- Manual Threshold Selection: The authors acknowledge that a limitation is the manual selection of thresholds for identifying potential anomalies.
- Future Work: They propose developing an adaptive threshold selection method to address this limitation.
Summary updated