Deep Weakly-supervised Anomaly Detection

Guansong Pang,Chunhua Shen,Huidong Jin,Anton van den Hengel
2023-06-05
Abstract:Recent semi-supervised anomaly detection methods that are trained using small labeled anomaly examples and large unlabeled data (mostly normal data) have shown largely improved performance over unsupervised methods. However, these methods often focus on fitting abnormalities illustrated by the given anomaly examples only (i.e.,, seen anomalies), and consequently they fail to generalize to those that are not, i.e., new types/classes of anomaly unseen during training. To detect both seen and unseen anomalies, we introduce a novel deep weakly-supervised approach, namely Pairwise Relation prediction Network (PReNet), that learns pairwise relation features and anomaly scores by predicting the relation of any two randomly sampled training instances, in which the pairwise relation can be anomaly-anomaly, anomaly-unlabeled, or unlabeled-unlabeled. Since unlabeled instances are mostly normal, the relation prediction enforces a joint learning of anomaly-anomaly, anomaly-normal, and normal-normal pairwise discriminative patterns, respectively. PReNet can then detect any seen/unseen abnormalities that fit the learned pairwise abnormal patterns, or deviate from the normal patterns. Further, this pairwise approach also seamlessly and significantly augments the training anomaly data. Empirical results on 12 real-world datasets show that PReNet significantly outperforms nine competing methods in detecting seen and unseen anomalies. We also theoretically and empirically justify the robustness of our model w.r.t. anomaly contamination in the unlabeled data. The code is available at <a class="link-external link-https" href="https://github.com/mala-lab/PReNet" rel="external noopener nofollow">this https URL</a>.
Machine Learning
What problem does this paper attempt to address?
### Problems the Paper Attempts to Solve This paper aims to address the issue of weakly-supervised anomaly detection. Specifically: 1. **Limitations of Existing Methods**: - Current semi-supervised anomaly detection methods mainly rely on a small number of labeled anomaly samples and a large amount of unlabeled data (usually normal data). Although these methods outperform unsupervised methods in terms of performance, they often can only identify anomaly types seen during training ("seen anomalies") and cannot generalize well to new types of anomalies not seen during training ("unseen anomalies"). - The effectiveness of these methods in detecting seen anomalies is also limited due to the lack of large-scale training anomaly data. 2. **Research Objectives**: - Propose a new deep weakly-supervised anomaly detection method that can detect both seen and unseen anomalies. - Utilize incomplete anomaly class representations to detect new types of anomalies and improve the model's detection performance for seen anomalies. 3. **Proposed Method**: - The authors introduce a new method called Pairwise Relation prediction Network (PReNet). This method learns pairwise relation features and anomaly scores by predicting the relationship between any two training instances (such as anomaly-anomaly, anomaly-unlabeled, or unlabeled-unlabeled). - In this way, the model can not only recognize seen anomalies but also identify unseen anomalies that conform to learned anomaly patterns or deviate from normal patterns. ### Main Contributions 1. **Problem and Method**: - The paper identifies a crucial but underexplored problem—weakly-supervised anomaly detection—and proposes a new pairwise relation learning method, PReNet, to address this issue. PReNet can learn diverse discriminative pairwise relation features, providing a detection model with better generalization ability than existing methods. 2. **Detection Model**: - PReNet is instantiated as a new detection model that learns pairwise anomaly scores by minimizing a triplet prediction loss. With significantly enhanced support from pairwise anomaly data, this model can effectively train a generalized detection model. 3. **Robustness**: - Theoretical and empirical analyses show that PReNet can tolerate anomaly contamination while utilizing a large amount of unlabeled data. 4. **Extensive Empirical Support**: - Experiments on 12 real-world datasets demonstrate that PReNet significantly outperforms nine state-of-the-art competing methods in detecting both seen and unseen anomalies and has better sample efficiency. For example, it requires 50%-87.5% less labeled anomaly data to achieve or surpass the performance of the best competing models.