[Paper Review] From Unsupervised to Few-shot Graph Anomaly Detection: A Multi-scale Contrastive Learning Approach
This paper proposes ANEMONE, a multi-scale contrastive learning framework for graph anomaly detection that jointly models node-level (patch) and subgraph-level (context) representations using graph neural networks. By maximizing agreement across multiple views and integrating few-shot labeled anomalies via ANEMONE-FS, it achieves state-of-the-art performance on six benchmark datasets, with up to 1.16% AUC gain from a single labeled anomaly.
Anomaly detection from graph data is an important data mining task in many applications such as social networks, finance, and e-commerce. Existing efforts in graph anomaly detection typically only consider the information in a single scale (view), thus inevitably limiting their capability in capturing anomalous patterns in complex graph data. To address this limitation, we propose a novel framework, graph ANomaly dEtection framework with Multi-scale cONtrastive lEarning (ANEMONE in short). By using a graph neural network as a backbone to encode the information from multiple graph scales (views), we learn better representation for nodes in a graph. In maximizing the agreements between instances at both the patch and context levels concurrently, we estimate the anomaly score of each node with a statistical anomaly estimator according to the degree of agreement from multiple perspectives. To further exploit a handful of ground-truth anomalies (few-shot anomalies) that may be collected in real-life applications, we further propose an extended algorithm, ANEMONE-FS, to integrate valuable information in our method. We conduct extensive experiments under purely unsupervised settings and few-shot anomaly detection settings, and we demonstrate that the proposed method ANEMONE and its variant ANEMONE-FS consistently outperform state-of-the-art algorithms on six benchmark datasets.
Motivation & Objective
- Address the limitation of existing graph anomaly detection methods that rely on single-scale representations, which fail to capture complex, multi-level anomalous patterns in real-world graphs.
- Overcome the inefficacy of purely unsupervised methods in scenarios where a small number of ground-truth anomalies are available, by integrating few-shot labeled data into the learning process.
- Develop a unified, flexible framework that enhances representation learning through contrastive learning at both patch (node) and context (subgraph) levels.
- Design a statistical anomaly estimator that leverages multi-perspective agreement across multiple contrastive rounds to improve anomaly score estimation.
- Demonstrate the effectiveness of the proposed method under both purely unsupervised and few-shot settings across diverse real-world graph datasets.
Proposed method
- Construct multiple graph views by applying different augmentation strategies at both node (patch) and subgraph (context) levels to capture multi-scale structural and feature information.
- Use two separate GNN encoders to embed nodes and their surrounding subgraphs, enabling joint learning of local and global representations.
- Form positive and negative instance pairs at both patch and context levels to perform contrastive learning, maximizing similarity between positive pairs and minimizing it between negative pairs.
- Integrate the contrastive scores from multiple rounds into a statistical anomaly estimator that computes a final anomaly score based on the degree of agreement across views.
- Extend ANEMONE to ANEMONE-FS by incorporating a small number of labeled anomalies into the contrastive learning objective, using them as positive samples to refine representation learning.
- Optimize the model using a weighted combination of patch-level and context-level contrastive losses, with a learnable hyperparameter α balancing the two components.
Experimental results
Research questions
- RQ1Can multi-scale contrastive learning at both patch and context levels improve the representation quality of nodes for graph anomaly detection compared to single-scale methods?
- RQ2How does the joint modeling of local and global structural patterns affect anomaly detection performance in complex graph data?
- RQ3To what extent can a small number of labeled anomalies (few-shot) improve the detection performance of an otherwise unsupervised graph anomaly detection framework?
- RQ4How sensitive is the proposed method to key hyperparameters such as evaluation rounds, subgraph size, and hidden dimension?
- RQ5Does the proposed statistical anomaly estimator, based on multi-round contrastive agreement, yield more robust and accurate anomaly scores than reconstruction-based or single-view contrastive methods?
Key findings
- ANEMONE achieves state-of-the-art performance across six benchmark datasets under purely unsupervised settings, outperforming existing SOTA methods in AUC across all datasets.
- ANEMONE-FS demonstrates significant performance gains with minimal labeled anomalies, achieving a 1.16% AUC improvement on the ACM dataset with just one labeled anomaly.
- The optimal balance between patch-level and context-level contrastive learning lies between α = 0.2 and α = 0.8, with performance dropping when relying solely on one level, indicating complementary benefits.
- The model is robust to subgraph size K, with best performance observed at K = 3–5 for citation networks and larger K for more densely connected networks like BlogCatalog.
- Performance improves with increasing evaluation rounds R up to 256, after which gains plateau and computational cost rises, justifying the choice of R = 256 as a balance.
- A hidden dimension D′ = 64 provides optimal trade-off between representation capacity and performance, with diminishing returns beyond D′ = 64.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.